import Image from "next/image"; import { Button } from "./ui/button"; import { login } from "@/lib/user/actions"; import { getCurrentUser } from "@/lib/user"; import Link from "next/link"; import { getNavLinks } from "@/lib/navlinks/repository"; import { MobileNav } from "./mobile-nav"; export default async function Header() { const user = await getCurrentUser(); const links = await getNavLinks(); const navLinks = links.map((link) => ({ id: link.id, href: link.href || (link.page ? `/${link.page.type.toLowerCase()}/${link.page.slug}` : "/"), label: link.label ?? link.page?.title ?? "", })); return (
Emblem of the European Federation

European Federation

{navLinks.map((link) => (

{link.label}

))}
{user ? ( ) : (
)}
); }