chore: refactor settings route
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { PageHeader } from "@/components/layout/page-header";
|
||||
import { getAllOtherDocuments, bookCodeToSlug } from "@/lib/other-documents";
|
||||
import { OtherDocumentsGrid } from "./other-documents-grid";
|
||||
import { buildOgMeta } from "@/lib/og";
|
||||
|
||||
export function generateMetadata(): Metadata {
|
||||
return buildOgMeta({
|
||||
title: "Other Documents",
|
||||
detail: "Miscellaneous analyses & writings",
|
||||
quote:
|
||||
"Writings and analyses by His Divine Grace A.C. Bhaktivedanta Swami Prabhupāda.",
|
||||
});
|
||||
}
|
||||
|
||||
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"
|
||||
>
|
||||
← 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-5xl mx-auto px-6 py-8">
|
||||
<OtherDocumentsGrid items={items} />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user