Skip to content

Commit

Permalink
fix: Fixed unwanted re render no sidebar navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Oct 30, 2023
1 parent a9d257b commit a100031
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ export const ModelNavigationBar = () => {
<Styled.SidebarContent>
<Styled.SidebarLink
className={menuItems[0].href === path && 'activeTab'}
key={menuItems[0].label}
{...menuItems[0]}
label={menuItems[0].label}
icon={menuItems[0].icon}
active={menuItems[0].href === path}
onClick={() => {
navigate('details');
}}
></Styled.SidebarLink>

<Styled.SidebarLink
disabled
className={('object' === path || 'variogram' === path) && 'activeTab'}
Expand All @@ -96,13 +97,14 @@ export const ModelNavigationBar = () => {
}}
></Styled.AccordionItem>
))}

<Styled.SidebarLink
className={
(menuItems[1].href === path || menuItems[1].href === path2) &&
'activeTab'
}
key={menuItems[1].label}
{...menuItems[1]}
label={menuItems[1].label}
icon={menuItems[1].icon}
active={menuItems[1].href === path || menuItems[1].href === path2}
onClick={() => {
navigate('results');
Expand Down

0 comments on commit a100031

Please sign in to comment.