Skip to content

fix: scroll-to-top on footer navigation links#66

Merged
HimanshuHeda merged 2 commits intoHimanshuHeda:mainfrom
Shreyas-TP:fix-footer-scroll
Aug 28, 2025
Merged

fix: scroll-to-top on footer navigation links#66
HimanshuHeda merged 2 commits intoHimanshuHeda:mainfrom
Shreyas-TP:fix-footer-scroll

Conversation

@Shreyas-TP
Copy link
Contributor

Fixes: #33

Description

Previously, when users clicked footer links (e.g., About Us, Contact, Privacy Policy, Terms of Service), the new page content loaded but retained the previous scroll position. This caused confusion as users often remained at the bottom of the new page and didn’t immediately see the content.
This update ensures that whenever a footer link is clicked and a new page loads, the scroll position resets to the top of the page.

Changes Made:

Implemented automatic scroll-to-top on route change/navigation.
Tested with all footer links (Quick links, Categories and Connect sections ) to confirm correct behavior.

How to Test:

  • Visit the site and scroll to the bottom.
  • Click on any footer link (e.g., About Us).
  • Confirm that the new page loads and automatically scrolls to the top.

Result:
Users can now immediately see the new content without needing to scroll manually.

@vercel
Copy link

vercel bot commented Aug 21, 2025

@Shreyas-TP is attempting to deploy a commit to the Himanshu Heda's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Aug 21, 2025

Deploy Preview for ziptales ready!

Name Link
🔨 Latest commit 04b6404
🔍 Latest deploy log https://app.netlify.com/projects/ziptales/deploys/68ac795a08faa8000823925d
😎 Deploy Preview https://deploy-preview-66--ziptales.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@HimanshuHeda
Copy link
Owner

@Shreyas-TP Please resolve the conflicts

@Shreyas-TP
Copy link
Contributor Author

I’ve resolved the merge conflicts in App.tsx, Chatbot.tsx, Footer.tsx, ArticleDetail.tsx, and Login.tsx.
The branch is now up to date with main. Please review and let me know if any further changes are needed

@HimanshuHeda HimanshuHeda merged commit f9f2ec6 into HimanshuHeda:main Aug 28, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Page doesn't scroll to top when navigating via footer links

2 participants