export const dynamic = "force-dynamic"; import Link from "next/link"; import { notFound } from "next/navigation"; import { getVaContent, getVaSidebarItems, type VaChapter, type VaSidebarItem, } from "@/lib/va"; import { PageHeader } from "@/components/page-header"; import { Card, CardContent } from "@/components/ui/card"; import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/mobile-nav"; export default async function VaChapterPage({ params, }: { params: Promise<{ chapter: string }>; }) { const { chapter: slug } = await params; const content = await getVaContent(slug); if (!content) notFound(); const sidebarItems = await getVaSidebarItems(); const currentIdx = sidebarItems.findIndex((item) => item.slug === slug); const prev = currentIdx > 0 ? sidebarItems[currentIdx - 1] : null; const next = currentIdx < sidebarItems.length - 1 ? sidebarItems[currentIdx + 1] : null; const chapterNum = (content as VaChapter).chapter; return (