nomadro/app/community/book/read/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

32 lines
1.1 KiB
TypeScript

import { getBook, getAllChapters } from "@community/lib/ebook/book.server";
import { ScrollReaderShell } from "@community/components/ebook/ScrollReaderShell";
import { buildBookMetadata } from "@community/lib/ebook/metadata";
import { getAdSlot } from "@community/lib/ebook/site-config.server";
import { getServerFeatures } from "@community/lib/ebook/features.server";
import { getLocale } from "@community/lib/ebook/i18n/server";
import type { Metadata } from "next";
export async function generateMetadata(): Promise<Metadata> {
const locale = await getLocale();
return buildBookMetadata(locale);
}
export default async function BookReadPage() {
const locale = await getLocale();
const book = getBook(locale);
const chapters = getAllChapters(locale);
const f = getServerFeatures();
return (
<ScrollReaderShell
book={book}
chapters={chapters}
affiliateRules={f.affiliate.enabled ? f.affiliate.rules : []}
adSlots={{
mid: f.ads.enabled ? getAdSlot("readerMidSlot") : "",
end: f.ads.enabled ? getAdSlot("readerEndSlot") : "",
}}
/>
);
}