Files
spsays-training/app/other-documents/page.tsx
T
2026-05-03 21:02:41 +05:30

43 lines
1.3 KiB
TypeScript

export const dynamic = "force-dynamic";
import Link from "next/link";
import { PageHeader } from "@/components/page-header";
import { getAllOtherDocuments, bookCodeToSlug } from "@/lib/other-documents";
import { OtherDocumentsGrid } from "./other-documents-grid";
export default async function OtherDocumentsPage() {
const documents = await getAllOtherDocuments();
const items = documents.map((doc) => ({
slug: bookCodeToSlug(doc.book),
title: doc.title,
description: doc.description ?? "",
year: doc.year,
totalChapters: doc.totalChapters,
href: `/other-documents/${bookCodeToSlug(doc.book)}`,
}));
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">
Other Documents
</h1>
<p className="mt-1 text-muted-foreground">
Miscellaneous documents, analyses, and writings by Śrīla Prabhupāda
</p>
</PageHeader>
<main className="max-w-6xl mx-auto px-6 py-8">
<OtherDocumentsGrid items={items} />
</main>
</div>
);
}