import Form from "next/form"; import { headers } from "next/headers"; import { redirect } from "next/navigation"; import { auth } from "@/lib/auth"; export const SignOutForm = () => { return (
{ "use server"; await auth.api.signOut({ headers: await headers(), }); redirect("/"); }} className="w-full" >
); };