Scroll to top when user ends up on error boundary

This commit is contained in:
Kalle 2026-06-27 20:22:03 +03:00
parent 86730a31e4
commit 61ecc307b9

View File

@ -23,6 +23,10 @@ export function Catcher() {
const { revalidate } = useRevalidator();
const location = useLocation();
React.useEffect(() => {
window.scrollTo(0, 0);
}, []);
// refresh user data to make sure it's up to date (e.g. cookie might have been removed, let's show the prompt to log back in)
const hasRevalidated = React.useRef(false);
React.useEffect(() => {