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>
24 lines
881 B
TypeScript
24 lines
881 B
TypeScript
import type { Metadata } from "next";
|
|
import { notFound } from "next/navigation";
|
|
import SiteShell from "@community/components/SiteShell";
|
|
import DigitalDayClient from "@community/components/DigitalDayClient";
|
|
import { api } from "@community/lib/api";
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
|
|
const { id } = await params;
|
|
const day = await api.getDigitalDay(id).catch(() => null);
|
|
return { title: day ? `${day.title} · nomadro` : "Daily guide · 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 (
|
|
<SiteShell showFooter>
|
|
<DigitalDayClient id={id} title={day.title} body={day.body} />
|
|
</SiteShell>
|
|
);
|
|
}
|