/** * @file components/layout/UserPanel.tsx * @description User panel component displaying the current user's avatar, status, settings link, and logout button. */ "use client"; import { LogOut, Settings } from "lucide-react"; import { signOut } from "next-auth/react"; import { UserAvatar } from "@/components/ui/UserAvatar"; import { useUser } from "@/lib/context/UserContext"; import Link from "next/link"; /** Renders the bottom user panel with user information and quick action controls. */ export function UserPanel() { const { currentUser } = useUser(); /** Handles logging out the user and redirecting to the login page. */ const handleLogout = async () => { await fetch("/api/auth/logout", { method: "POST" }); await signOut({ callbackUrl: "/login" }); }; return (