code100x / daily-code

https://projects.100xdevs.com/
833 stars 1.02k forks source link

bug: Disabled navigation buttons Prev and Next are still clickable #667

Open Amit-K-007 opened 1 month ago

Amit-K-007 commented 1 month ago

Bug Description

The "Previous" and "Next" buttons for navigating slides remain clickable even when disabled (either on the first or last slide), causing unnecessary re-renders of the page.

Expected Behavior

Steps to Reproduce

Demo

https://github.com/user-attachments/assets/1be39057-6b95-48e0-8ba9-7151c257992a

Blackhammer98 commented 1 month ago

when we click first time on previous or next button for a particular page that page renders only one time , if we click again for that page it does not re-rendered , i tried this and on network tab request went only first click for particular page .

Amit-K-007 commented 1 month ago

Ya, but as Link component is still clickable, the user is just getting redirected on same page again and again. You can notice it by seeing a blue loading line which appears on top of screen.