Open sohailk12 opened 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dev-find | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 9, 2024 7:23am |
Thanks for fixing the issue I brought up, only thing is that you might want to remove the console.log() from production code and for here in App.js
{profiles.length >= recordsPerPage ? ( <Pagination currentPage={currentPage} totalPages={Math.ceil((searching ? profiles.length : shuffledProfiles.length) / recordsPerPage)} onNextPage={handleNextPage} onPrevPage={handlePrevPage} /> ) : ( '' )}
you can just use && to render the pagination since there is nothing to render if pagination is not shown
so like (profiles.length >= recordsPerPage) && <Pagination {...} />
Hopefully they get your pr merged soon
Description
Fixes: Issue #1092 when the user searches for a specific name the pagination is still visible and if there are less than 20 profiles in the list the pagination is still visible
Related Issues
when the user searches for a name and the list is less than 20 the pagination should be hidden
Changes Proposed
Applied a condition in app.js file if the length of profiles array is greater than 20 only then the pagination is visible
Checklist
Screenshots
https://github.com/user-attachments/assets/803358e9-be0c-4fae-80b8-b67965d0c44a
Note to reviewers
Please review my code and if it is helpful do let me know