Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination for catalog #30

Merged
merged 3 commits into from
Feb 6, 2024
Merged

Conversation

maithyy
Copy link
Member

@maithyy maithyy commented Feb 1, 2024

  • Created pagination footer component which can be reused for other tables
  • Made catalog.js use pagination footer component
  • Removed console.log in auth file because it was logging api key 💀

image

Some questions:

  • The PNP example we referred to had a reusable pagination component which is why we also did that. Did we need to make it reusable? I'm not sure what possible future tables we may need (maybe managing users page?)
  • How the pagination component works is that the Catalog page passes the component their setData, and then at the component level when the rows are clicked, it has a useEffect that uses the Catalog's setData. Is this fine? We were thinking it would be better practice to have it so that Catalog maintains control of all those states (total data count, row range, etc.) and then it's passed to pagination footer and lessening the components' functionality.

Closes #23

@ThatMegamind ThatMegamind linked an issue Feb 5, 2024 that may be closed by this pull request
Copy link
Member

@michellelin1 michellelin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work! looks good to us :)

@michellelin1 michellelin1 merged commit 87e2cf6 into dev Feb 6, 2024
2 of 3 checks passed
@michellelin1 michellelin1 deleted the 23-catalog-pagination-frontend branch February 6, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catalog Pagination (Frontend)
3 participants