2025-09-21 11:02:31 -07:00
|
|
|
import Form from "next/form";
|
2026-03-20 09:37:02 +00:00
|
|
|
|
|
|
|
|
import { signOut } from "@/app/(auth)/auth";
|
2024-10-24 16:35:51 -04:00
|
|
|
|
|
|
|
|
export const SignOutForm = () => {
|
|
|
|
|
return (
|
|
|
|
|
<Form
|
|
|
|
|
action={async () => {
|
2025-09-21 11:02:31 -07:00
|
|
|
"use server";
|
2024-10-24 16:35:51 -04:00
|
|
|
|
2026-03-20 09:37:02 +00:00
|
|
|
await signOut({
|
|
|
|
|
redirectTo: "/",
|
2024-10-24 16:35:51 -04:00
|
|
|
});
|
|
|
|
|
}}
|
2025-09-21 11:02:31 -07:00
|
|
|
className="w-full"
|
2024-10-24 16:35:51 -04:00
|
|
|
>
|
|
|
|
|
<button
|
2025-09-21 12:03:29 +01:00
|
|
|
className="w-full px-1 py-0.5 text-left text-red-500"
|
2025-09-21 11:02:31 -07:00
|
|
|
type="submit"
|
2024-10-24 16:35:51 -04:00
|
|
|
>
|
|
|
|
|
Sign out
|
|
|
|
|
</button>
|
|
|
|
|
</Form>
|
|
|
|
|
);
|
|
|
|
|
};
|