"use client"; import Link from "next/link"; import { signOut } from "next-auth/react"; import { usePathname, useRouter } from "next/navigation"; import { UserProps } from "@/lib/types/UserProps"; interface HeaderAuthProps { user: UserProps | null; } export default function HeaderAuth({ user }: HeaderAuthProps) { const pathname = usePathname(); const router = useRouter(); const active = pathname === "/" ? "home" : pathname?.startsWith("/annonces/rent") ? "rent" : pathname?.startsWith("/annonces/buy") ? "buy" : pathname?.startsWith("/profil") ? "profil" : null; const firstName = user?.firstName || ""; const lastName = user?.lastName || ""; return ( ); }