chatbot-template/components/sign-out-form.tsx

26 lines
446 B
TypeScript
Raw Normal View History

import Form from 'next/form';
import { signOut } from '@/app/(auth)/auth';
export const SignOutForm = () => {
return (
<Form
className="w-full"
action={async () => {
'use server';
await signOut({
redirectTo: '/',
});
}}
>
<button
type="submit"
2025-09-09 15:44:07 -04:00
className="w-full px-1 py-0.5 text-left text-red-500"
>
Sign out
</button>
</Form>
);
};