marleymarl / geotimeline

12 stars 10 forks source link

Pass demoOrReal prop to /dataview after postData() redirect to DataView and use it in DataView to set GET API Url (demo or real) #54

Closed marleymarl closed 4 years ago

marleymarl commented 4 years ago

In MapContainer after a user clicks on 'Save and Exit' they should be redirected to a DataView with corresponding data to which track they were on (i.e. demo data for demo track and real for real track -- demo or real having been set as a prop in UpFrontButtonForm and passed up to GeoTimeline and down to MapContainer). A few different ways to do this so committer gets to pick (unless we want to have a discussion about it). Depending on choice may be a good candidate for refactor later.

BaNazari commented 4 years ago

As suggested in #51 we can add 3 buttons on the homepage; 2 of them would be "start a footprint" and "Let me test (Demo)". Then we conditionally render real data or fake data save buttons within the same component.

marleymarl commented 4 years ago

That first feature already exists at https://app.geotimeline.com. By the time the user goes to the Map they are already on a track of capturing demo vs real data. So when they click Save and Exit it is saving to one or the other DB. DataView needs a prop to tell it which API to pull the data from.

marleymarl commented 4 years ago

This issue blocked for assignment.

marleymarl commented 4 years ago

Solved a different way.