/** * @file components/sidebar/UserProfile.tsx * @description User profile component displaying current session info, status, settings, and logout action. */ "use client"; import { LogOut, Settings } from "lucide-react"; import { signOut, useSession } from "next-auth/react"; /** * Renders the user profile card with user information, online status, settings, and logout trigger. * * @returns {JSX.Element} The rendered user profile footer element. */ export function UserProfile() { const { data: session } = useSession(); const handleLogout = () => { signOut({ callbackUrl: "/login" }); }; const username = session?.user?.name || "User"; const userInitial = username.charAt(0).toUpperCase(); return (
); }