Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary fix of critical error encoutered during demos #680

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use as 'a'
  • Loading branch information
hanbyul-here committed Sep 27, 2023
commit 586e5adadf71ca3e7a8bb33da0eee140cc7ac147
29 changes: 10 additions & 19 deletions app/scripts/components/common/page-header.tsx
Original file line number Diff line number Diff line change
@@ -60,11 +60,6 @@ const PageHeaderSelf = styled.header`
}
`;

const force_reload = (current_path) => {

window.location.replace(current_path)
};

const Brand = styled.div`
display: flex;
flex-shrink: 0;
@@ -348,18 +343,8 @@ function PageHeader() {
}, [isMediumDown]);

const closeNavOnClick = useCallback((e) => {


setGlobalNavRevealed(false);

// Need a time out for the event to register the current path
setTimeout(() => {
let current_path = e.target.baseURI;
force_reload(current_path)

}, 120);

}, []);
}, []);

return (
<PageHeaderSelf id={HEADER_ID}>
@@ -414,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>