This commit is contained in:
2025-12-27 21:03:20 +01:00
parent 29e2f254dd
commit c667deff8b
33 changed files with 701 additions and 100 deletions

View File

@ -0,0 +1,20 @@
"use client";
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
export function LogoutButton() {
const router = useRouter();
async function logout() {
await fetch("/api/auth/sign-out", { method: "POST" });
router.replace("/login");
router.refresh();
}
return (
<Button variant="secondary" onClick={logout}>
Sign out
</Button>
);
}