import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { loadMe, ROLE_NAMES, signInHref } from "@/lib/admin"; export const metadata: Metadata = { title: "Admin", robots: { index: false, follow: false } }; export const dynamic = "force-dynamic"; // The admin (docs/WEBSITE-1.0-PLAN.md ยง10), signed in through the church's Accounts. The screens // (template and style, pages, messages, events, publish) come next. export default async function Admin() { const me = await loadMe(); if (!me) redirect(signInHref("/admin")); return (

Website admin

Signed in as {me.user.name} ({me.user.email}), {ROLE_NAMES[me.user.role]}.

); }