mongo fix

This commit is contained in:
gosangam
2026-04-14 19:12:11 +05:30
parent e2f8063d90
commit beffb9fae1
172 changed files with 18029 additions and 1298 deletions
+50
View File
@@ -0,0 +1,50 @@
import Link from "next/link";
import { PageHeader } from "@/components/page-header";
import { GlossaryClient } from "./glossary-client";
import { getAllGlossaryEntries } from "@/lib/api";
export default async function GlossaryPage() {
const entries = await getAllGlossaryEntries();
const letters = Array.from(
new Set(
entries
.map((e) => e.term.charAt(0).toUpperCase())
.filter((ch) => ch.length > 0),
),
).sort();
const data = {
title: "Glossary",
description:
"Sanskrit and Bengali terms used in the books of His Divine Grace A.C. Bhaktivedanta Swami Prabhupāda.",
totalEntries: entries.length,
letters,
entries: entries.map((e) => ({
term: e.term,
definition: e.definition,
definition_html: e.definitionHtml,
})),
};
return (
<div className="min-h-screen bg-background">
<PageHeader>
<Link
href="/"
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
>
&larr; Home
</Link>
<h1 className="mt-3 text-3xl font-bold text-foreground">
{data.title}
</h1>
<p className="mt-1 text-muted-foreground">{data.description}</p>
</PageHeader>
<main className="max-w-3xl mx-auto px-6 py-8">
<GlossaryClient data={data} />
</main>
</div>
);
}