title: In Database there are 2 events but when click on Submit it shows 4 events(actually it doubles it up ) ? How to solve this issue
body: <pre><code>  const allEvents = async () =&gt; {
  
      
  </code></pre>
  <p>In Database there are 2 events but when click on Submit it shows 4 events(actually it doubles it up ) ? How to solve this issue
  But as soon as i click submit it just doubles up the events in an array if there 2 events in database ,it shows 4 events means its duplicating the values</p>