chatbot-template/components/custom/sign-out-form.tsx
Jared Palmer a68eb2a011
Start on new sidebar (#456)
Co-authored-by: shadcn <m@shadcn.com>
2024-10-24 13:35:51 -07:00

25 lines
446 B
TypeScript

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"
className="w-full text-left px-1 py-0.5 text-red-500"
>
Sign out
</button>
</Form>
);
};