Merge pull request #506 from m-tartari/fix/nav-scroll
🐛 fix(router): ensure window scrolls to top on route change
This commit is contained in:
@@ -13,6 +13,10 @@ const RouteTracker = () => {
|
|||||||
analytics.page()
|
analytics.page()
|
||||||
}, [analytics, location])
|
}, [analytics, location])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
|
}, [location])
|
||||||
|
|
||||||
return <Outlet />
|
return <Outlet />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user