diff --git a/components/shared/nav-bar.tsx b/components/shared/nav-bar.tsx index 10514e9..e6db444 100644 --- a/components/shared/nav-bar.tsx +++ b/components/shared/nav-bar.tsx @@ -26,8 +26,9 @@ export function NavBar({ isDemo, roles }: NavBarProps) { const productId = productMatch ? productMatch[1] : null const navLinks = [ - { href: '/dashboard', label: 'Producten' }, - { href: '/todos', label: "Todo's" }, + { href: '/dashboard', label: 'Producten', active: pathname.startsWith('/dashboard') || pathname.startsWith('/products') && !pathname.includes('/solo') }, + { href: '/solo', label: 'Solo', active: pathname.includes('/solo') }, + { href: '/todos', label: "Todo's", active: pathname.startsWith('/todos') }, ] return ( @@ -51,7 +52,7 @@ export function NavBar({ isDemo, roles }: NavBarProps) { href={link.href} className={cn( 'px-3 py-1.5 rounded-md text-sm transition-colors', - pathname.startsWith(link.href) + link.active ? 'bg-primary-container text-primary-container-foreground font-medium' : 'text-muted-foreground hover:text-foreground hover:bg-surface-container' )}