From 270a6a44767f6bc0208a9ce191cf3b7e0af6d07b Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Mon, 16 Jun 2025 13:32:26 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(router):=20ensure=20window?= =?UTF-8?q?=20scrolls=20to=20top=20on=20route=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/templates/RouteTracker/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/templates/RouteTracker/index.tsx b/src/components/templates/RouteTracker/index.tsx index 0d8cfe9..eee72d5 100644 --- a/src/components/templates/RouteTracker/index.tsx +++ b/src/components/templates/RouteTracker/index.tsx @@ -13,6 +13,10 @@ const RouteTracker = () => { analytics.page() }, [analytics, location]) + useEffect(() => { + window.scrollTo(0, 0) + }, [location]) + return }