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 ; }