remove nav listener on unmount
This commit is contained in:
@@ -5,7 +5,7 @@ export default function ScrollToTop() {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0, {});
|
||||
window.scrollTo(0, 0, { behavior: "smooth" });
|
||||
}, [pathname]);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user