diff --git a/admin-spa/src/components/nav/SubmenuBar.tsx b/admin-spa/src/components/nav/SubmenuBar.tsx index bfce836..2518272 100644 --- a/admin-spa/src/components/nav/SubmenuBar.tsx +++ b/admin-spa/src/components/nav/SubmenuBar.tsx @@ -26,16 +26,10 @@ export default function SubmenuBar({ items = [], fullscreen = false, headerVisib
{items.map((it) => { const key = `${it.label}-${it.path || it.href}`; - // Exact match for submenu items, or match with sub-paths (e.g., /settings/notifications matches /settings/notifications/staff) - // Special handling: if item has exact flag, only match exact path - let isActive = false; - if (it.path) { - if (it.exact) { - isActive = pathname === it.path; - } else { - isActive = pathname === it.path || pathname.startsWith(it.path + '/'); - } - } + // Determine active state based on exact pathname match + // Only ONE submenu item should be active at a time + const isActive = it.path === pathname; + const cls = [ 'ui-ctrl inline-flex items-center gap-2 rounded-md px-2.5 py-1.5 border text-sm whitespace-nowrap', 'focus:outline-none focus:ring-0 focus:shadow-none',