feat: enhance navigation state handling for history overview
- Updated NavLink components in App and DesktopSidebar to conditionally pass state for the '/history' route, improving user experience by maintaining the selected tab on navigation.
This commit is contained in:
parent
1c512b0d0a
commit
3eb7ef3ae6
|
|
@ -79,6 +79,7 @@ function Nav({ isAdmin }) {
|
|||
<NavLink
|
||||
key={item.to}
|
||||
to={item.to}
|
||||
state={item.to === '/history' ? { tab: 'overview' } : undefined}
|
||||
end={!!item.end}
|
||||
className={({ isActive }) =>
|
||||
'nav-item' +
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export default function DesktopSidebar({
|
|||
<NavLink
|
||||
key={item.to}
|
||||
to={item.to}
|
||||
state={item.to === '/history' ? { tab: 'overview' } : undefined}
|
||||
end={!!item.end}
|
||||
className={({ isActive }) =>
|
||||
'desktop-sidebar__link' +
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user