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

feat: Added Pagination for posts section with backend api successfully Issue 40 #67

Merged

Conversation

MeetDOD
Copy link
Contributor

@MeetDOD MeetDOD commented Jun 1, 2024

Pull Request Resolves[#40 ]

Title: Applied Pagination in Frontend with Backend API for Style Share webapp Successfully.

Description

  1. I had created a hook name currentPage and setcurrentPage which will change the number of posts with the const postsPerPage = 9.

  2. I had created handlePreviousPage which will decrement by - 1 and handleNextPage which will increment by + 1 per posts.

  3. In backend I had created an api with function getPostsWithPagination which basically do 3 tasks with variables skip, take, select as with pageSize 12.

Related Issues

Fixes #40

Changes Made

New feature introduced as pagination in posts page.

Screenshots (if applicable)

image

I certify that I have carried out the relevant code of conduct and provided the requisite screenshot for validation by submitting this pull request.

Thank You for this contribution.

Copy link

vercel bot commented Jun 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
style-share ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 3:54pm

Copy link

github-actions bot commented Jun 1, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

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

Looks great, just don't hardcode the page size on the backend and pass it via api

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 1, 2024

Done :)

@VaibhavArora314 VaibhavArora314 merged commit f74056e into VaibhavArora314:main Jun 1, 2024
3 checks passed
Copy link

github-actions bot commented Jun 1, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc GSSOC level3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination in Style Share
3 participants