Skip to content

Commit

Permalink
BUGFIX pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
lencodes committed Sep 27, 2023
1 parent 346a302 commit cfb9e95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pwa/src/templates/templateParts/header/HeaderTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ export const HeaderTemplate: React.FC<HeaderTemplateProps> = ({ 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 = [
{
Expand Down

0 comments on commit cfb9e95

Please sign in to comment.