'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { ThemaUmschalter } from './ThemaUmschalter'; export type Navigationseintrag = { pfad: string; titel: string }; export function Kopfzeile({ eintraege, name, rolle, abmeldeAktion, }: { eintraege: Navigationseintrag[]; name: string; rolle: string; abmeldeAktion: () => Promise; }) { const pfad = usePathname(); function istAktiv(ziel: string): boolean { if (ziel === '/') return pfad === '/'; return pfad === ziel || pfad.startsWith(`${ziel}/`); } return (
Lern-Bar
{name} · {rolle}
); }