Skip to content

Commit 6da898d

Browse files
author
Rajat Saxena
committed
WIP: Logout page
1 parent cc170b6 commit 6da898d

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { signOut } from "@/auth";
2+
import { Button } from "@components/ui/button";
3+
import { redirect } from "next/navigation";
4+
5+
export default function Page() {
6+
return (
7+
<form
8+
action={async () => {
9+
"use server";
10+
await signOut();
11+
redirect("/");
12+
}}
13+
>
14+
<Button type="submit">Logout</Button>
15+
</form>
16+
);
17+
}

0 commit comments

Comments
 (0)