feat: added logout route and icon
This commit is contained in:
parent
eb74878380
commit
d781567b4f
1 changed files with 6 additions and 3 deletions
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue