[Bug]: "Back to Components" button loses pagination state and resets to Page 1
#617 opened on May 25, 2026
Repository metrics
- Stars
- (114 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
When browsing the components list, navigating to a component from any page other than the first page (e.g., Page 2) and then clicking the "Back to Components" button resets the user's location back to Page 1. The pagination state is not preserved, which interrupts the browsing experience for users exploring elements sequentially.
Steps to Reproduce
- Navigate to the components list page (
/components). - Scroll down and navigate to Page 2 (or any page other than Page 1) using the pagination controls.
- Click on any component card (e.g., "Accordion") to view its details.
- Once on the component details page, click the "Back to Components" button at the top left.
- Observe that you are returned to Page 1 instead of the page you originally navigated from.
Expected Behavior
Clicking "Back to Components" should remember the previous pagination state and return the user to the exact page they were on before viewing the specific component.
Actual Behavior
The pagination state is lost, and the user is always redirected back to Page 1.
Screenshots / Video
https://drive.google.com/file/d/1M2gYRY-uVxiJmk6owe5MCA0FKEHhpvA-/view?usp=drive_link
Possible Solution
Since the project appears to use React/Next.js, the current page number could be passed as a URL query parameter (e.g., /components?page=2). Alternatively, session storage or a global state context could be used to remember the active page index so the "Back" button can route the user appropriately.
Environment
- OS: [Windows 11]
- Browser: [Brave]
Additional Context
I am participating in GSSoC 2026 and would love to be assigned to this issue so I can work on a fix!