import Link from "next/link"; 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"; import { getBookMeta } from "@/lib/api"; import { notFound } from "next/navigation"; type ChapterInfo = { number: number; title: string; totalVerses: number; }; type CantoInfo = { number: number; title: string; totalChapters: number; chapters: ChapterInfo[]; }; export default async function SbPage() { const meta = await getBookMeta("sb"); if (!meta) notFound(); const intro = meta as { book: string; title: string; author: string; totalCantos: number; cantos: CantoInfo[]; }; return (
← Books

{intro.title}

{intro.author}

    {intro.cantos.map((canto) => { const totalVerses = canto.chapters.reduce( (sum, ch) => sum + ch.totalVerses, 0, ); return (
  • Canto {canto.number}

    {canto.title}

    {canto.totalChapters} chapters ยท{" "}
  • ); })}
); }