marleymarl / geotimeline

12 stars 10 forks source link

Create a new prop 'demo vs real' on MapContainer and change save URL based on that #49

Closed marleymarl closed 4 years ago

marleymarl commented 4 years ago

As discussed on our calls, we are creating two tracks for using GeoTimeline:

a. For demo purposes (i.e. getting feedback) so people who are not confirmed cases can use the map and 'save and exit' and see demo data (i.e. data is not real). This is what is currently there on app.geotimeline.com. b. Real confirmed case data, entered in anonymously and privately by confirmed cases, and data is real.

The way into the component will have different buttons that can pass the prop in. Assume prop can be demovsreeal with possible values 'demo' or 'real'.

In MapContainer,

if props.demovsreal === demo { <the fetch url inside postData() === https://cn1aotmhx0.execute-api.us-east-1.amazonaws.com/default/savetimeline> }

else if props.demovsreal === real { <the fetch url inside postData() === https://cn1aotmhx0.execute-api.us-east-1.amazonaws.com/default/saverealtimeline> }

NB: /saverealtime not available yet (will be soon).