developmentseed / osm-teams

Teams for OpenStreetMap!
https://mapping.team
MIT License
26 stars 5 forks source link

Duplicate teams #118

Open kamicut opened 4 years ago

kamicut commented 4 years ago

For some reason, there are a few duplicate teams on the website after we've launched this publicly. I'm not sure why, I wonder if there is a bug here that is duplicating the POST request or maybe it could be a double click on the create button.

guidorice commented 4 years ago

I ran into this with a team I created, Four Corners Mappers, and I believe it was just via an Edit Team interaction that it occurred (although I cannot reproduce it more than once for a team).

vgeorge commented 2 years ago

If still happening, this is probably originated here:

https://github.com/developmentseed/osm-teams/blob/dd72b6f9d82b1297f612f2db9d3e968796864366/components/edit-team-form.js#L128-L142

As the button is of type 'submit', it will send the form, but the onClick event is also submitting the form.