first commit
This commit is contained in:
commit
8b2b772a32
31 changed files with 8994 additions and 0 deletions
13
src/components/logout.tsx
Normal file
13
src/components/logout.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use client";
|
||||
|
||||
import { authClient } from "@/lib/auth-client";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function Logout() {
|
||||
const handleLogout = async () => {
|
||||
await authClient.signOut();
|
||||
redirect("/");
|
||||
};
|
||||
|
||||
return <button onClick={handleLogout}>Logout</button>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue