feat: enhance navigation state handling for history overview
All checks were successful
Deploy Development / deploy (push) Successful in 59s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 16s

- 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:
Lars 2026-04-21 08:19:34 +02:00
parent 1c512b0d0a
commit 3eb7ef3ae6
2 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ function Nav({ isAdmin }) {
<NavLink <NavLink
key={item.to} key={item.to}
to={item.to} to={item.to}
state={item.to === '/history' ? { tab: 'overview' } : undefined}
end={!!item.end} end={!!item.end}
className={({ isActive }) => className={({ isActive }) =>
'nav-item' + 'nav-item' +

View File

@ -35,6 +35,7 @@ export default function DesktopSidebar({
<NavLink <NavLink
key={item.to} key={item.to}
to={item.to} to={item.to}
state={item.to === '/history' ? { tab: 'overview' } : undefined}
end={!!item.end} end={!!item.end}
className={({ isActive }) => className={({ isActive }) =>
'desktop-sidebar__link' + 'desktop-sidebar__link' +