From afbe05b4c88d5042c17f4a59c0739dc8942642a9 Mon Sep 17 00:00:00 2001 From: Stixx Date: Fri, 6 Dec 2024 21:00:52 +0100 Subject: [PATCH] fix: footer 'Home' button scroll to top when on home page, fixed logic --- src/components/Footer/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 249b8c4..c7459e3 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -69,7 +69,7 @@ export const Footer = () => component={Link} to={'/'} onClick={(event) => { - if (window.location.pathname === '/') { + if (['', '#/'].includes(window.location.hash)) { event.preventDefault() window.scrollTo(0, 0) }