From 61ecc307b95b22293ce3fa03746cdf5cec54da31 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 27 Jun 2026 20:22:03 +0300 Subject: [PATCH] Scroll to top when user ends up on error boundary --- app/components/Catcher.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/Catcher.tsx b/app/components/Catcher.tsx index 1ff46abbd..a44da4f74 100644 --- a/app/components/Catcher.tsx +++ b/app/components/Catcher.tsx @@ -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(() => {