Added auto-scroll-to-top on all page navigations - fixes mobile scrolling issue

- **Navigation auto-scroll**: window.scrollTo(0, 0) added to location.pathname useEffect
- **Mobile UX fix**: No more manual scrolling back up after version selection
- **Smooth navigation flow**: Every route change brings user to page top
- **Better mobile experience**: Prevents getting stuck scrolled down on new pages
- **Applies to all routes**: Home → Books → Chapters → Verses all auto-scroll to top

Mobile users can now seamlessly navigate without manual scrolling between pages!
This commit is contained in:
Ryderjj89
2025-09-28 16:53:06 -04:00
parent 93e4b80428
commit d05b5fb20a

View File

@@ -43,6 +43,9 @@ function App() {
// At root path, no version is selected
setSelectedVersion('');
}
// Scroll to top when navigating to new pages
window.scrollTo(0, 0);
}, [location.pathname]);
useEffect(() => {