Initial commit: Kalendartool (Next.js, Prisma, Docker)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kühn
2026-10-08 14:38:04 +02:00
commit bc49c3074e
94 changed files with 12812 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
'use client';
/** Logout-Button: beendet die Session per API und laedt neu. */
import { useRouter } from 'next/navigation';
import { Button } from '@/components/ui/ui';
export function LogoutButton() {
const router = useRouter();
async function logout() {
await fetch('/api/auth/logout', { method: 'POST' });
router.push('/login');
router.refresh();
}
return (
<button
type="button"
onClick={logout}
className="rounded-md bg-slate-200 px-4 py-2 text-sm font-medium text-slate-900 hover:bg-slate-300"
>
Abmelden
</button>
);
}