Skip to content

Commit

Permalink
馃悰 Fix Sidebar highlighting of selected menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikEight committed May 24, 2024
1 parent 6733d0a commit e1c0af4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function Sidebar({ children }) {
icon: <GroupOutlinedIcon />,
action: handleNavigate,
navigate: '/accounts',
additionalPaths: ['/'],
showInFooter: false
},
{
Expand Down Expand Up @@ -153,7 +154,7 @@ function Sidebar({ children }) {
<SidebarButton
key={index + menu.name}
menu={menu}
selected={menu.navigate === location.pathname}
selected={menu.navigate === location.pathname || menu.additionalPaths?.includes(location.pathname)}
/>
))
}
Expand Down

0 comments on commit e1c0af4

Please sign in to comment.