import { notFound } from "next/navigation" import { ChapterContent } from "@/components/chapter-content" import { getSectionBySlug, getChapterBySectionSlug } from "@/lib/book-file-system" import { specialSections } from "@/lib/book-data" interface ReadPageProps { params: Promise<{ id: string }> } export const dynamic = "force-dynamic" export const runtime = "nodejs" export default async function ReadPage({ params }: ReadPageProps) { const { id } = await params if (id === "preface") { return } if (id === "epilogue") { return } try { const section = getSectionBySlug(id) if (!section) { notFound() } const context = getChapterBySectionSlug(id) if (!context) { notFound() } return } catch (error) { console.error("[v0] Error in ReadPage:", error) notFound() } }