import { notFound } from "next/navigation"; import { Account, type AccountSection } from "../Account"; const TITLES: Record = { details: "Your details", security: "Signing in", privacy: "Privacy", activity: "Activity" }; export async function generateMetadata({ params }: { params: Promise<{ section: string }> }) { const { section } = await params; return { title: TITLES[section] ?? "Your account" }; } /** One section of the account page (1.3.0): /account/details, /security, /privacy, /activity. */ export default async function AccountSectionPage({ params }: { params: Promise<{ section: string }> }) { const { section } = await params; if (!(section in TITLES)) notFound(); return ; }