"use client"; import { useSession, signOut } from "next-auth/react"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { NotificationBell } from "@/components/notifications/NotificationBell"; import { getInitials } from "@/lib/utils"; import { LogOut, User, Settings } from "lucide-react"; import Link from "next/link"; interface HeaderProps { title?: string; breadcrumbs?: { label: string; href?: string }[]; } export function Header({ title, breadcrumbs }: HeaderProps) { const { data: session } = useSession(); const user = session?.user; return (
{/* Left: Title / Breadcrumbs */}
{breadcrumbs ? ( ) : ( title && (

{title}

) )}
{/* Right: Notifications + User menu */}

{user?.name}

{user?.email}

Settings signOut({ callbackUrl: "/login" })} > Sign out
); }