import type { Metadata } from "next"; import { notFound } from "next/navigation"; import SiteShell from "@/components/SiteShell"; import Link from "next/link"; import { api } from "@/lib/api"; export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise { const { id } = await params; const day = await api.getDigitalDay(id).catch(() => null); return { title: day ? `${day.title} · nomadro` : "每日指南" }; } export default async function DigitalDayPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const day = await api.getDigitalDay(id).catch(() => null); if (!day) notFound(); return (
📅 DAY {id}

{day.title}

{day.body}

); }