import Link from "next/link"; import { getBookMeta } from "@/lib/api"; import { PageHeader } from "@/components/page-header"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { ExtractedVerseCount } from "../extracted-verse-count"; type ChapterInfo = { number: number; title: string; totalVerses: number; }; type LilaInfo = { key: string; name: string; totalChapters: number; totalVerses: number; chapters: ChapterInfo[]; }; export default async function CcPage() { const meta = await getBookMeta("cc"); if (!meta) { return (
Book metadata not found.
); } const lilas = meta.lilas as LilaInfo[]; const title = meta.title as string; const author = meta.author as string; return (
← Books

{title}

{author}

    {lilas.map((lila) => { const totalVerses = lila.chapters.reduce( (sum, ch) => sum + ch.totalVerses, 0, ); return (
  • {lila.name}

    {lila.totalChapters} chapters

  • ); })}
); }