Skip to content

Commit 665ca37

Browse files
committed
Ensure page scrolls to top on route change
1 parent 52132c6 commit 665ca37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/App.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const AppContent = () => {
2323
const matchedRoute = routes.find(r => r.path === `/${path}`);
2424
const title = matchedRoute?.title ? `${matchedRoute.title}` : 'ARIA Lab';
2525
document.title = `${title} | Align Robust Interactive Autonomy Lab`;
26+
window.scrollTo(0, 0);
2627
}, [location]);
2728

2829
return (

0 commit comments

Comments
 (0)