export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { getTlcMeta, getTlcIntroSegments } from "@/lib/tlc"; import { ogForBook } from "@/lib/og"; import { PageHeader } from "@/components/layout/page-header"; import { JsonLd } from "@/components/seo/json-ld"; import { bookJsonLd } from "@/lib/jsonld"; import { Card, CardContent } from "@/components/ui/card"; export function generateMetadata(): Metadata { return ogForBook("tlc"); } const PART_LABELS: Record = { 1: "Part I", 2: "Part II", }; export default async function TlcPage() { const meta = await getTlcMeta(); if (!meta) notFound(); const introSegments = await getTlcIntroSegments(); return (
← Books

{meta.title}

{meta.subtitle}

{meta.author}

{/* Description */} {meta.description && (

{meta.description}

)} {/* Front Matter */} {introSegments && introSegments.length > 0 && (

Front Matter

    {introSegments.map((seg) => (
  • {seg.title}

  • ))}
)} {/* Parts & Chapters */} {meta.parts.map((part) => { const partChapters = part.chapters .map((num) => meta.chapters.find((ch) => ch.number === num)) .filter(Boolean) as { number: number; title: string }[]; return (

{PART_LABELS[part.number] ?? `Part ${part.number}`}

    {partChapters.map((ch) => (
  • Chapter {ch.number}

    {ch.title}

  • ))}
); })}
); }