feat(ST-313): add Sprint nav link to navbar when on product page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-25 22:53:45 +02:00
parent 0a27be4886
commit 4e62377c4f

View file

@ -22,6 +22,9 @@ interface NavBarProps {
export function NavBar({ isDemo, roles }: NavBarProps) {
const pathname = usePathname()
const productMatch = pathname.match(/^\/products\/([^/]+)/)
const productId = productMatch ? productMatch[1] : null
const navLinks = [
{ href: '/dashboard', label: 'Producten' },
{ href: '/todos', label: "Todo's" },
@ -56,6 +59,19 @@ 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 */}