-
Notifications
You must be signed in to change notification settings - Fork 78
Fix: Reset scroll position on page navigation #165
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
Conversation
@prakhar-174, thanks for your contribution. Please just delete the |
The conflicting file package-lock.json was deleted.
Hello @Alexandrbig1 , I have removed the package-lock.json file that was generated after executing the command npm install --legacy-peer-deps. The pull request has now been updated and no longer shows any conflicts with the base branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to Open Code Chicago! 🎉
Thank you for making your first contribution here — we’re glad to have you.
Hey @prakhar-174 , 🎉 Congratulations on your first merged pull request! To celebrate this milestone, you’ve earned the “First PR Merged” badge on Holopin 🏅 Once claimed, you can proudly showcase it on your GitHub profile, Holopin board, or share it on LinkedIn to mark your first contribution to the open-source world 🌟 Keep contributing, keep growing, and welcome to the Open Code Chicago community! 🚀 |
@prakhar-174, congratulations on your merged PR! 🎉 Don’t forget to add yourself as a contributor using our |
Pull Request
Thanks for contributing to Hacktoberfest 2025!
Description
This PR implements automatic scroll-to-top behavior when navigating between routes in the SPA. Previously, when users scrolled down on one page and navigated to another, they would remain at the same scroll position, causing confusion. This fix ensures every route transition starts from the top of the page.
Changes made:
ScrollToTop
component that usesuseLocation
hook to detect route changesScrollToTop
intoRootLayout
to apply globally across all routesIssue: Fixes scroll position persistence bug during SPA navigation
Closes #113
Checklist