From cfb9e95a9629f8db53293b8ac246a8f5c52ea176 Mon Sep 17 00:00:00 2001 From: Lennart Bank Date: Wed, 27 Sep 2023 14:16:23 +0200 Subject: [PATCH] BUGFIX pathname --- pwa/src/templates/templateParts/header/HeaderTemplate.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx index a68386c1e..5cfb7afb1 100644 --- a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx +++ b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx @@ -46,12 +46,13 @@ export const HeaderTemplate: React.FC = ({ layoutClassName }; React.useEffect(() => { + console.log({ pathname }); setIsHomePage( pathname === "/" || (process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "true" && pathname === `/${process.env.GATSBY_GITHUB_REPOSITORY_NAME}/`), ); - }, [location]); + }, [pathname]); const primaryTopNavItems = [ {