Files
project-claude/src/app/(dashboard)/logout-button.tsx
T
ogrechkoandClaude Sonnet 5 bcf0e86618 Build AI Chief of Staff MVP: auth, mailbox sync, briefings, draft replies
Scaffolds a Next.js app with email/password auth, encrypted IMAP/SMTP/CalDAV
mailbox connections, a background sync job, Claude-generated daily briefings,
and an approve-before-send draft reply flow. Includes a clean design system
(light/dark) and deployment config (systemd unit, credential rotation script).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012o9j9RezxbZVKQMrB7oRLY
2026-07-26 10:54:34 +00:00

20 lines
376 B
TypeScript

"use client";
import { useRouter } from "next/navigation";
export function LogoutButton() {
const router = useRouter();
async function onClick() {
await fetch("/api/auth/logout", { method: "POST" });
router.push("/login");
router.refresh();
}
return (
<button onClick={onClick} className="btn btn-subtle btn-sm">
Log out
</button>
);
}