- Website: an icon sidebar in groups (Your site, Content, Go live, Team), a dashboard with cards and a tile per part of the admin, steps to the first publish across the top of every admin page, and a live preview beside the page editor and Template and style (computer or phone width, folds away, reloads on save). A framed request (Sec-Fetch-Dest: iframe) with an admin session reads the drafts, so no preview cookie is set. /preview/start takes ?to=. The page editor has Content and Page details tabs. - Accounts: /admin is an overview (cards, "Needs you", a tile per section); People moved to /admin/people; the sidebar shows the part you're in, grouped, with a count on Deletion requests; People redesigned, with a confirm before Deactivate; Email and WhatsApp split into two cards. - Both: darker grey labels for contrast; lucide-react in the Website. - e2e: the live preview shows drafts while the site stays live; axe on the page editor. - docs: VERSIONS, changelogs, WHATS-NEW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
746 B
TypeScript
16 lines
746 B
TypeScript
import { notFound } from "next/navigation";
|
|
import { ADMIN_SECTIONS, type AdminSection } from "@/lib/sections";
|
|
import { Admin } from "../Admin";
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ section: string }> }) {
|
|
const { section } = await params;
|
|
return { title: ADMIN_SECTIONS[section as AdminSection]?.title ?? "Admin" };
|
|
}
|
|
|
|
/** One section of admin (1.3.0): /admin/people, /deletions, /church, … (1.8.0: /admin itself is the overview). */
|
|
export default async function AdminSectionPage({ params }: { params: Promise<{ section: string }> }) {
|
|
const { section } = await params;
|
|
if (section === "overview" || !(section in ADMIN_SECTIONS)) notFound();
|
|
return <Admin section={section as AdminSection} />;
|
|
}
|