Skip to content

Commit

Permalink
Sidemenu project id fix (#872)
Browse files Browse the repository at this point in the history
* Navigate to current project in Welcome

* Use currentProject.id in sidemenu navigation
  • Loading branch information
taustad authored Nov 15, 2022
1 parent a3e1948 commit 3ecba75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/Components/SideMenu/ProjectMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function ProjectMenu({ project }: Props) {
return (
<ExpandableDiv>
<nav>
<LinkWithoutStyle to={ProjectPath(fusionContextId!)}>
<LinkWithoutStyle to={ProjectPath(currentProject?.externalId!)}>
<MenuItem
title={project.name!}
isSelected={currentProject?.externalId === project.id}
Expand All @@ -75,7 +75,7 @@ function ProjectMenu({ project }: Props) {
<Item key={`project-menu-item-${index + 1}`}>
{projectMenuItem.name === ProjectMenuItemType.OVERVIEW && (
<nav>
<LinkWithoutStyle to={`/${fusionContextId}`}>
<LinkWithoutStyle to={`/${currentProject?.id}`}>
<ProjectMenuItemComponent
item={projectMenuItem}
projectId={project.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ function ProjectMenuItemComponent({ item, projectId, subItems }: Props) {
{subItems.map((subItem, index) => (
<SubItem key={`menu-sub-item-${index + 1}`}>
<nav>
<LinkWithoutStyle to={CasePath(fusionContextId!, subItem.id ? subItem.id : "")}>
<LinkWithoutStyle to={CasePath(
currentProject?.id!,
subItem.id ? subItem.id : "",
)}
>
<MenuItem
title={subItem.name ? subItem.name : "Untitled"}
isSelected={isSelected && caseId === subItem.id}
Expand Down

0 comments on commit 3ecba75

Please sign in to comment.