Pocket / curation-tools-frontend

DEPRECATED
Mozilla Public License 2.0
10 stars 52 forks source link

Create the edit and approve page #113

Closed nina-py closed 3 years ago

nina-py commented 3 years ago

Closes #98.

Implementation Decisions

Note that this is still rough around the edges but since it was getting pretty big I thought I shouldn't be adding any more to it for the time being.

I have wired this up both to the Add Story form - so you can immediately edit the prospect data parsed by the API, as well as the "Edit & Approve" button on the Prospects tab. If you access the page directly, the prospect won't be loaded from the API - I think this should be done later on, once the API is reworked otherwise multiple calls to Apollo directly from the page get very messy very quickly.

For the same reason (waiting for API abstraction layer), only the "Approve" button sends a call to the API at the moment - the other buttons just show a success message regardless. Additionally, a successful update sends the user back to the tab they came from The loading spinner remains for now - to be updated to a consistent UI further down the track.