Skip to content

Commit

Permalink
Temporary fix of critical error encoutered during demos (#680)
Browse files Browse the repository at this point in the history
opening this to investigate, do not merge this yet
@amarouane-ABDELHAK I do think my change here achieves the same effect
that you are trying to do. (not using special routting, but treat the
tag like normal a tag, so the page gets reloaded everytime.)
lmk how you think.
  • Loading branch information
hanbyul-here authored Sep 27, 2023
2 parents a41df01 + 51219d8 commit df3367d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/scripts/components/common/page-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ function PageHeader() {
if (!isMediumDown) setGlobalNavRevealed(false);
}, [isMediumDown]);

const closeNavOnClick = useCallback(() => setGlobalNavRevealed(false), []);
const closeNavOnClick = useCallback(() => {
setGlobalNavRevealed(false);
}, []);

return (
<PageHeaderSelf id={HEADER_ID}>
Expand Down Expand Up @@ -397,22 +399,28 @@ function PageHeader() {
<GlobalMenu>
<li>
<GlobalMenuLink
to={DATASETS_PATH}
as='a'
href={DATASETS_PATH}
onClick={closeNavOnClick}
>
Data Catalog
</GlobalMenuLink>
</li>
<li>
<GlobalMenuLink
to={ANALYSIS_PATH}
as='a'
href={ANALYSIS_PATH}
onClick={closeNavOnClick}
>
Data Analysis
</GlobalMenuLink>
</li>
<li>
<GlobalMenuLink to={STORIES_PATH} onClick={closeNavOnClick}>
<GlobalMenuLink
as='a'
href={STORIES_PATH}
onClick={closeNavOnClick}
>
{getString('stories').other}
</GlobalMenuLink>
</li>
Expand Down

0 comments on commit df3367d

Please sign in to comment.