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
20 lines
376 B
TypeScript
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>
|
|
);
|
|
}
|