"use client"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { IconHome, IconList, IconUser, IconHeart, IconChart, IconPin, IconSpark } from "@/components/icons"; const ITEMS = [ { href: "/membre", label: "Tableau de bord", Icon: IconHome, exact: true }, { href: "/membre/annonces", label: "Mes annonces", Icon: IconList }, { href: "/membre/messages", label: "Messages", Icon: IconSpark }, { href: "/membre/visites", label: "Visites", Icon: IconPin }, { href: "/membre/favoris", label: "Favoris et recherches", Icon: IconHeart }, { href: "/membre/alertes", label: "Alertes", Icon: IconChart }, { href: "/membre/profil", label: "Profil et préférences", Icon: IconUser }, { href: "/membre/securite", label: "Sécurité et sessions", Icon: IconUser }, ]; export function MemberNav({ email, name, roles }: { email: string; name: string | null; roles: string[] }) { const path = usePathname(); const router = useRouter(); const logout = async () => { await fetch("/api/auth/logout", { method: "POST" }); router.push("/"); router.refresh(); }; return ( ); }