/** * @file components/sidebar/UserPanel.tsx * @description Client component providing a footer user panel with session information, avatar display, online status, and settings/logout actions. */ "use client"; import { LogOut, Settings } from "lucide-react"; import { signOut, useSession } from "next-auth/react"; /** * Renders the user panel footer component showing current session profile details and authentication controls. * * @returns {JSX.Element} The rendered user panel component. */ export function UserPanel() { const { data: session } = useSession(); /** * Triggers the NextAuth sign-out procedure and redirects the user to the login page. */ const handleLogout = () => { signOut({ callbackUrl: "/login" }); }; const username = session?.user?.name || "User"; const userInitial = username.charAt(0).toUpperCase(); return (