import type { Metadata } from "next"; import { notFound } from "next/navigation"; import SiteShell from "@community/components/SiteShell"; import VideoDetailClient from "@community/components/VideoDetailClient"; import { api } from "@community/lib/api"; export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise { const { slug } = await params; const video = await api.getVideo(slug).catch(() => null); return { title: video ? `${video.title} · nomadro` : "视频 · nomadro" }; } export default async function VideoDetailPage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const video = await api.getVideo(slug).catch(() => null); if (!video) notFound(); return ( ); }