import type { Metadata } from "next"; import { getAllChapters, getBook } from "@community/lib/ebook/book.server"; import { CoverPage } from "@community/components/ebook/CoverPage"; import { buildBookMetadata } from "@community/lib/ebook/metadata"; import { getSiteConfig, getAdSlot } from "@community/lib/ebook/site-config.server"; import { getServerFeatures } from "@community/lib/ebook/features.server"; import { getLocale } from "@community/lib/ebook/i18n/server"; export async function generateMetadata(): Promise { const locale = await getLocale(); return buildBookMetadata(locale); } export default async function BookCoverPage() { const locale = await getLocale(); const book = getBook(locale); const site = getSiteConfig(); const f = getServerFeatures(); const chapterMinutes = Object.fromEntries( getAllChapters(locale).map((chapter) => [chapter.slug, chapter.readingMinutes]) ); return ( ); }