maxlemieux / quokka

Project 3 "Quokka"
MIT License
0 stars 2 forks source link

Create plant detail view page #72

Open maxlemieux opened 3 years ago

maxlemieux commented 3 years ago

This needs to be a new page component that looks like an encyclopedia article for each plant, with the live feed on the right side as with the rest of the site.

maxlemieux commented 3 years ago

Existing plants in database become the datastore for this feature. They stop being favorites records.

We will need to also add a new collection for Favorites, where each Favorite record in this collection is just a pointer to a user and a pointer to a plant.

maxlemieux commented 3 years ago

There will be a 1:1 relationship between Plants in our database, and Plants records in the Trefle database. The data in Plants should be as complete as possible an archive of the response from the Trefle plant detail endpoint.

Our search should also be using Plant, not Species.

maxlemieux commented 3 years ago

As with the existing UserFavorites functionality, the detail page should fetch the information through the Trefle API, but with the added functionality that it first checks to see if the Plant record exists in the local collection. If it doesn't exist, it saves it for next time.