fix: bg chapter verse index

This commit is contained in:
gosangam
2026-04-18 01:39:01 +05:30
parent c573c94c51
commit 5235f479b3
30 changed files with 113 additions and 115 deletions
+10 -8
View File
@@ -43,15 +43,17 @@ export default async function VersePage({
);
if (!verse) notFound();
// Build mobile nav groups — single flat list of chapters
// Build mobile nav groups — verses for the current chapter
const mobileNavGroups: MobileNavGroup[] = [
{
title: "Chapters",
items: bgMeta.chapters.map((ch) => ({
slug: `${ch.number}`,
label: `${ch.number}. ${ch.title}`,
href: `/books/bg/${ch.number}/1`,
type: "chapter",
title: "Verses",
items: verseIndex.map((v) => ({
slug: String(v.verse),
label: v.verseEnd
? `Verse ${chapter}.${v.verse}–${v.verseEnd}`
: `Verse ${chapter}.${v.verse}`,
href: `/books/bg/${chapter}/${v.verse}`,
type: "verse",
})),
},
];
@@ -85,7 +87,7 @@ export default async function VersePage({
basePath={`/books/bg/${chapter}`}
showBengali={false}
mobileNavGroups={mobileNavGroups}
mobileNavBookTitle="Bhagavad-gītā As It Is"
mobileNavBookTitle={`Chapter ${chapter}: ${title}`}
/>
</div>
</div>