fix: Admin Home nav highlight stuck when visiting child routes

/admin/servers.startsWith('/admin') was true, so both Admin Home
and Server Fleet highlighted simultaneously. Now /admin uses
exact match like / does.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-02-15 02:17:33 -05:00
parent 88b50a30b4
commit 072fa26544

View File

@@ -55,7 +55,7 @@ const adminNavItems = [
]
function isActive(path: string): boolean {
if (path === '/') return route.path === '/'
if (path === '/' || path === '/admin') return route.path === path
return route.path.startsWith(path)
}