Pocket / curation-tools-frontend

DEPRECATED
Mozilla Public License 2.0
10 stars 53 forks source link

Add pagination to Prospects page #123

Closed nina-py closed 3 years ago

nina-py commented 3 years ago

Goal

Add pagination to Prospects - so that users can paginate through data on all four tabs on the Prospects page instead of having access to just the first 50 entries on each tab.

Implementation Decisions

Still a WIP - I just wanted some early feedback. I've set pagination up in a very simple way - there's more work to be done to make sure Apollo caches the paginated data correctly and I'd like to refactor the Prospects page component as it's too messy at the moment with lots of code repetition.

I initially set it up with a perPage parameter as well but I'm not sure it's actually needed so have taken it out for now.

nina-py commented 3 years ago

Just to illustrate... The MUI Pagination widget, wired up to the routing, so the links are /en-US/prospects/?page=3, etc.

pagination_widget

nina-py commented 3 years ago

Ready for review! Please note that I have updated the pagination widget - can't use MUI Pagination with the info we get back from the API so I constructed a basic widget of my own that shows the information we do get back from the API:

pagination_version2