import type { JSX } from "react" import { notFound } from "next/navigation" import { ArrowLeft } from "lucide-react" import Link from "next/link" import { Button } from "@/shared/components/ui/button" import { Badge } from "@/shared/components/ui/badge" import { getTextbookById, getChaptersByTextbookId, getKnowledgePointsByTextbookId } from "@/modules/textbooks/data-access" import { TextbookReader } from "@/modules/textbooks/components/textbook-reader" import { TextbookSettingsDialog } from "@/modules/textbooks/components/textbook-settings-dialog" export const dynamic = "force-dynamic" export default async function TextbookDetailPage({ params, }: { params: Promise<{ id: string }> }): Promise { const { id } = await params const [textbook, chapters, knowledgePoints] = await Promise.all([ getTextbookById(id), getChaptersByTextbookId(id), getKnowledgePointsByTextbookId(id), ]) if (!textbook) { notFound() } return (
{/* Header / Nav (Fixed height) */}
{textbook.subject} {textbook.grade}

{textbook.title}

{/* Main Content Layout (Flex grow) */}
) }