nomadro/app/community/videos/[slug]/page.tsx
eric 9928c5185b Mount nav/book/community as native App Router routes in one Next process.
Replace reverse-proxy/iframe approach with @ebook/@community/@navmini imports under /nav /book /community so localhost:3000 serves all three products directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:49:16 -05:00

23 lines
863 B
TypeScript

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<Metadata> {
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 (
<SiteShell showFooter>
<VideoDetailClient video={video} />
</SiteShell>
);
}