diff --git a/components/ScrollUp.tsx b/components/ScrollUp.tsx index 0a12c7f3..a5a8f3f8 100644 --- a/components/ScrollUp.tsx +++ b/components/ScrollUp.tsx @@ -6,7 +6,9 @@ import { useEffect } from "react"; export default function ScrollUp() { const pathname = usePathname(); - useEffect(() => window.scroll(0, 0), [pathname]); + useEffect(() => { + window.scroll(0, 0); + }, [pathname]); return null; }