"use client"; import Link from "next/link"; import { useSession, signOut } from "next-auth/react"; import { useEffect, useState } from "react"; import { usePathname } from "next/navigation"; import { useRouter } from "next/navigation"; export default function Header() { const { data: session } = useSession(); 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 = session?.user?.firstName || ""; const lastName = session?.user?.lastName || ""; return (
ImmoNext
); }