cd1d6a1a28
Ship the Podcast Distribution AI wordmark as real assets and replace the Mic-tile + text placeholder everywhere it appeared. - public/logo-dark.png (dark wordmark, for light backgrounds) and public/logo-light.png (light wordmark, for dark backgrounds) - New <Logo> component swaps the two via Tailwind dark: variants, so the dark logo shows on all non-themed surfaces (marketing, auth, admin, public share) and the light logo only in dark-mode app surfaces - Wire <Logo> into the marketing header/footer, auth layout, app header (default branch only - white-label org logos untouched), admin header (+ Admin badge), and the public share page - Favicon via App Router file convention: app/icon.png + app/apple-icon.png Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
51 lines
2.1 KiB
TypeScript
51 lines
2.1 KiB
TypeScript
import Link from "next/link";
|
|
import { ArrowLeft } from "lucide-react";
|
|
import { requireAdmin } from "@/lib/auth/guards";
|
|
import { AdminSidebar } from "@/components/admin/admin-sidebar";
|
|
import { AdminMobileNav } from "@/components/admin/admin-mobile-nav";
|
|
import { UserMenu } from "@/components/app/user-menu";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Logo } from "@/components/ui/logo";
|
|
|
|
// Authed, DB-backed admin surface — never statically prerender.
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function AdminLayout({ children }: { children: React.ReactNode }) {
|
|
const session = await requireAdmin();
|
|
|
|
return (
|
|
<div className="flex min-h-screen flex-col">
|
|
<header className="sticky top-0 z-30 flex h-16 items-center justify-between border-b border-border bg-background/85 px-4 backdrop-blur-md md:px-6">
|
|
<div className="flex items-center gap-1">
|
|
<AdminMobileNav />
|
|
<Link href="/admin" className="flex items-center gap-2.5" aria-label="Podcast Distribution AI Admin">
|
|
<Logo className="h-7 w-auto" priority />
|
|
<span className="rounded-md bg-foreground px-1.5 py-0.5 font-display text-[11px] font-bold uppercase tracking-wide text-background">
|
|
Admin
|
|
</span>
|
|
</Link>
|
|
</div>
|
|
<div className="flex items-center gap-3">
|
|
<Button asChild variant="ghost" size="sm">
|
|
<Link href="/dashboard">
|
|
<ArrowLeft className="h-4 w-4" /> Back to app
|
|
</Link>
|
|
</Button>
|
|
<UserMenu name={session.user.name} email={session.user.email} image={session.user.image} isAdmin />
|
|
</div>
|
|
</header>
|
|
|
|
<div className="flex flex-1">
|
|
<aside className="hidden w-64 shrink-0 border-r border-border bg-background md:block">
|
|
<div className="sticky top-16">
|
|
<AdminSidebar />
|
|
</div>
|
|
</aside>
|
|
<main className="flex-1 bg-secondary/50">
|
|
<div className="container max-w-6xl py-8 md:py-10">{children}</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|