import { Suspense } from "react"; import Link from "next/link"; import { format } from "date-fns"; import { notFound } from "next/navigation"; const StatRow = ({ title, description }: { title: string; description?: number }) => { return (
{title} {description?.toLocaleString() ?? "N/A"}
); }; const VideoInfo = async ({ id }: { id: string }) => { const backendURL = process.env.BACKEND_URL; const res = await fetch(`${backendURL}/video/${id}/info`); if (!res.ok) { return notFound(); } const data = await res.json(); return (

{data.title || data.bvid}

{data.bvid} · av{data.aid}
发布于 {format(new Date(data.pubdate * 1000), "yyyy-MM-dd HH:mm:ss")}
播放:{(data.stat?.view ?? 0).toLocaleString()} ·{" "} 弹幕:{(data.stat?.danmaku ?? 0).toLocaleString()}
分区: {data.tname}, tid{data.tid} · v2: {data.tname_v2}, tid {data.tid_v2}

Video cover

简介

				{data.desc}
			

统计数据

); }; export default async function VideoPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; return (

正在努力加载中……

} > ); }