export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { getTranscriptionsByPlace } from "@/lib/transcriptions"; import { buildOgMeta } from "@/lib/og"; import { PageHeader } from "@/components/page-header"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Clock, MapPin } from "lucide-react"; import { PlayAudioButton } from "@/app/(app)/transcriptions/[slug]/play-audio-button"; export async function generateMetadata({ params, }: { params: Promise<{ place: string }>; }): Promise { const { place: encodedPlace } = await params; const place = decodeURIComponent(encodedPlace); const transcriptions = await getTranscriptionsByPlace(place); return buildOgMeta({ title: "Transcriptions", detail: `${transcriptions.length} transcriptions from ${place}`, quote: `Lectures and conversations of Śrīla Prabhupāda in ${place}.`, }); } export default async function TranscriptionsByPlacePage({ params, }: { params: Promise<{ place: string }>; }) { const { place: encodedPlace } = await params; const place = decodeURIComponent(encodedPlace); const transcriptions = await getTranscriptionsByPlace(place); if (transcriptions.length === 0) notFound(); return (
← Transcriptions by Place

Transcriptions in {place}

{transcriptions.length} transcriptions

{transcriptions.map((t) => (

{t.name}

{t.type === "lecture" ? "Lecture" : "Conversation"}
{t.date && {t.date}} {t.reference && ( {t.reference} )} {t.durationMinutes && t.durationMinutes > 0 && ( {t.durationMinutes} min )}
{t.audioUrl && ( )} ))}
); }