feat: added logout route and icon

This commit is contained in:
Maximilian Liebmann 2025-04-19 22:20:46 +02:00 committed by SomeCodecat
parent eb74878380
commit d781567b4f

View file

@ -1,15 +1,18 @@
import { signOut } from '@/auth'; import { signOut } from '@/auth';
import Button from '../Button'; import Button from '../button';
import { faDoorOpen } from '@fortawesome/free-solid-svg-icons';
export function Logout() { export function Logout() {
return ( return (
<form <form
action={async () => { action={async () => {
'use server'; 'use server';
await signOut(); await signOut({ redirectTo: '/login' });
}} }}
> >
<Button type='submit'>Sign Out</Button> <Button type='submit' mode='primary' icon={faDoorOpen}>
Sign Out
</Button>
</form> </form>
); );
} }