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
35 lines
951 B
TypeScript
35 lines
951 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { getCurrentSession } from "@/lib/auth/session";
|
|
import { LogoutButton } from "./logout-button";
|
|
import { NavLinks } from "./nav-links";
|
|
|
|
export default async function DashboardLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const session = await getCurrentSession();
|
|
if (!session) {
|
|
redirect("/login");
|
|
}
|
|
|
|
return (
|
|
<div style={{ display: "flex", flexDirection: "column", minHeight: "100%", flex: 1 }}>
|
|
<header className="topnav">
|
|
<div className="topnav-inner">
|
|
<div className="brand">
|
|
<div className="brand-mark" />
|
|
Chief of Staff
|
|
</div>
|
|
<NavLinks />
|
|
<div className="user-menu">
|
|
<span className="user-email">{session.user.email}</span>
|
|
<LogoutButton />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main style={{ flex: 1 }}>{children}</main>
|
|
</div>
|
|
);
|
|
}
|