feat: fix nav link order to Producten, Sprint, Solo, Todo's
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d684732ec8
commit
abb42a7046
1 changed files with 6 additions and 18 deletions
|
|
@ -26,9 +26,10 @@ export function NavBar({ isDemo, roles }: NavBarProps) {
|
|||
const productId = productMatch ? productMatch[1] : null
|
||||
|
||||
const navLinks = [
|
||||
{ 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') },
|
||||
{ href: '/dashboard', label: 'Producten', active: pathname.startsWith('/dashboard') || (pathname.startsWith('/products') && !pathname.includes('/solo')), show: true },
|
||||
{ href: productId ? `/products/${productId}/sprint` : '/dashboard', label: 'Sprint', active: pathname.includes('/sprint'), show: !!productId },
|
||||
{ href: '/solo', label: 'Solo', active: pathname.includes('/solo'), show: true },
|
||||
{ href: '/todos', label: "Todo's", active: pathname.startsWith('/todos'), show: true },
|
||||
]
|
||||
|
||||
return (
|
||||
|
|
@ -46,9 +47,9 @@ export function NavBar({ isDemo, roles }: NavBarProps) {
|
|||
|
||||
{/* Nav links */}
|
||||
<nav className="flex items-center gap-1 ml-2">
|
||||
{navLinks.map(link => (
|
||||
{navLinks.filter(l => l.show).map(link => (
|
||||
<Link
|
||||
key={link.href}
|
||||
key={link.label}
|
||||
href={link.href}
|
||||
className={cn(
|
||||
'px-3 py-1.5 rounded-md text-sm transition-colors',
|
||||
|
|
@ -60,19 +61,6 @@ export function NavBar({ isDemo, roles }: NavBarProps) {
|
|||
{link.label}
|
||||
</Link>
|
||||
))}
|
||||
{productId && (
|
||||
<Link
|
||||
href={`/products/${productId}/sprint`}
|
||||
className={cn(
|
||||
'px-3 py-1.5 rounded-md text-sm transition-colors',
|
||||
pathname.includes('/sprint')
|
||||
? 'bg-primary-container text-primary-container-foreground font-medium'
|
||||
: 'text-muted-foreground hover:text-foreground hover:bg-surface-container'
|
||||
)}
|
||||
>
|
||||
Sprint
|
||||
</Link>
|
||||
)}
|
||||
</nav>
|
||||
|
||||
{/* Rechts: rollen + instellingen + uitloggen */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue