import { mockDb } from '@/lib/mockDb' import { Link } from '@/i18n/routing' import { notFound } from 'next/navigation' import { ArrowLeft, Layers } from 'lucide-react' import ListingCard from '@/components/ListingCard' import type { Metadata } from 'next' interface Props { params: Promise<{ locale: string; slug: string }> } export async function generateMetadata({ params }: Props): Promise { const { locale, slug } = await params const col = await mockDb.getCollectionBySlug(slug) if (!col) return {} const title = locale === 'en' ? col.titleEn : locale === 'ru' ? col.titleRu : col.titleTr const description = locale === 'en' ? col.descriptionEn : locale === 'ru' ? col.descriptionRu : col.descriptionTr const fullTitle = `${title} — Marmaris Local` return { title: fullTitle, description, openGraph: { title: fullTitle, description, type: 'website', ...(col.coverImage ? { images: [{ url: col.coverImage }] } : {}), }, } } export default async function CollectionDetailPage({ params }: Props) { const { locale, slug } = await params const col = await mockDb.getCollectionBySlug(slug) if (!col) { notFound() } const title = locale === 'en' ? col.titleEn : locale === 'ru' ? col.titleRu : col.titleTr const desc = locale === 'en' ? col.descriptionEn : locale === 'ru' ? col.descriptionRu : col.descriptionTr const listings = col.listings || [] return (
{/* Back Link */} GERİ DÖN {/* Collection details banner */}
{col.coverImage && (
{title}
)}
Editör Seçkisi

{title}

{desc}

{/* Listings Grid */}

seçkide yer alan yerler ({listings.length})

{listings.length === 0 ? (
Bu seçkiye henüz mekan eklenmemiş.
) : (
{listings.map((listing) => ( ))}
)}
) }