feat: add policy pages

This commit is contained in:
gosangam
2026-06-02 01:57:08 +05:30
parent 0352cb2003
commit 91d5d272d2
168 changed files with 1326 additions and 81 deletions
+66
View File
@@ -0,0 +1,66 @@
export const dynamic = "force-dynamic";
import type { Metadata } from "next";
import Link from "next/link";
import { PageHeader } from "@/components/page-header";
import { buildOgMeta } from "@/lib/og";
import {
getLetterYears,
getLetterRecipients,
getLetterLocations,
getTotalLetterCount,
} from "@/lib/letters";
import { LettersNav } from "./letters-nav";
import { LettersBrowser } from "./letters-browser";
export function generateMetadata(): Metadata {
return buildOgMeta({
title: "Letters",
detail: "6,800+ letters (1947–1977)",
quote:
"Personal correspondence by Śrīla Prabhupāda — guiding disciples, Godbrothers, and well-wishers in the science of Kṛṣṇa consciousness.",
});
}
export default async function LettersPage({
searchParams,
}: {
searchParams: Promise<{ view?: string }>;
}) {
const { view = "year" } = await searchParams;
const [years, recipients, locations, totalCount] = await Promise.all([
getLetterYears(),
getLetterRecipients(),
getLetterLocations(),
getTotalLetterCount(),
]);
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">Letters</h1>
<p className="mt-1 text-muted-foreground">
{totalCount.toLocaleString()} letters by Śrīla Prabhupāda (1947–1977)
</p>
</PageHeader>
<main className="max-w-4xl mx-auto px-6 py-8 space-y-6">
<LettersNav currentView={view} />
<LettersBrowser
currentView={view}
years={years}
recipients={recipients}
locations={locations}
/>
</main>
</div>
);
}