/** * @file SignOutButton.tsx * @description Server Action-powered client component that allows users to sign out and redirect to the home page. */ import { signOut } from "@/auth"; import { LogOut } from "lucide-react"; /** * Renders a sign-out button using a Server Action to securely terminate the user session. * * @returns {JSX.Element} The rendered sign-out button component. */ export default function SignOutButton() { return (
{ "use server"; await signOut({ redirectTo: "/" }); }} >
); }