refactor: Design System v4 — flat dark theme with icon rail sidebar #119
@@ -160,7 +160,9 @@ export function Sidebar() {
|
||||
/* ── Active detection ─────────────────────────────── */
|
||||
|
||||
const isActive = (item: NavEntry) => {
|
||||
if (item.matchPaths) return item.matchPaths.some(p => location.pathname.startsWith(p))
|
||||
if (item.matchPaths) return item.matchPaths.some(p =>
|
||||
p === '/' ? location.pathname === '/' : location.pathname.startsWith(p)
|
||||
)
|
||||
if (item.href === '/') return location.pathname === '/'
|
||||
return location.pathname.startsWith(item.href)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user