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

fix: add pointer cursor on hover for pagination buttons in tracks #655

Merged
merged 1 commit into from
Sep 19, 2024
Merged

fix: add pointer cursor on hover for pagination buttons in tracks #655

merged 1 commit into from
Sep 19, 2024

Conversation

amartripathi0
Copy link
Contributor

PR Fixes:

UX: Default cursor on pagination button hover to pointer cursor
Screenshot from 2024-09-19 13-56-05

Resolves #654

Checklist before requesting a review

  • [ ✔ ] I have performed a self-review of my code
  • [ ✔] I assure there is no similar/duplicate pull request regarding same issue

@devsargam devsargam merged commit 9f9e1d9 into code100x:main Sep 19, 2024
@devsargam
Copy link
Collaborator

Thank u sir!

Copy link

@gitpulldikshant gitpulldikshant left a comment

Choose a reason for hiding this comment

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

`const PaginationItemComponent = ({ children, onClick }) => (

{children}

);

setCurrentPage((prev) => Math.max(prev - 1, 1))}>
{Array.from({ length: totalPages }).map((_, index) => (
  <PaginationItemComponent key={index} onClick={() => setCurrentPage(index + 1)}>
    <PaginationLink>{index + 1}</PaginationLink>
  </PaginationItemComponent>
))}

<PaginationItemComponent onClick={() => setCurrentPage((prev) => Math.min(prev + 1, totalPages))}>
  <PaginationNext />
</PaginationItemComponent>
`

Although the optimizations in this context won't have a significant performance impact, reducing redundant operations improves code efficiency and reduces cognitive overhead for future modifications

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.

bug: Pagination Section Cursor Issue
3 participants