chore: clean up scratch files and apply remaining updates
This commit is contained in:
@@ -5,6 +5,8 @@ import { Link } from '@/i18n/routing'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { MapPin, SlidersHorizontal, Check } from 'lucide-react'
|
||||
import LiveFilterForm from '@/components/LiveFilterForm'
|
||||
import type { Metadata } from 'next'
|
||||
import { basicMetadata } from '@/lib/seo'
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{ locale: string, category: string }>
|
||||
@@ -18,6 +20,31 @@ interface PageProps {
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export async function generateMetadata({ params }: PageProps): Promise<Metadata> {
|
||||
const { locale, category: categorySlug } = await params
|
||||
const categories = await mockDb.getCategories()
|
||||
const category = categories.find(c => c.slug === categorySlug)
|
||||
if (!category) return {}
|
||||
|
||||
const name = locale === 'ru' ? category.nameRu : locale === 'en' ? category.nameEn : category.nameTr
|
||||
|
||||
const title =
|
||||
locale === 'en'
|
||||
? `${name} in Marmaris — Marmaris Local`
|
||||
: locale === 'ru'
|
||||
? `${name} в Мармарисе — Marmaris Local`
|
||||
: `Marmaris ${name} Rehberi — Marmaris Local`
|
||||
|
||||
const description =
|
||||
locale === 'en'
|
||||
? `Browse the best ${name.toLowerCase()} in Marmaris, filtered by neighborhood and price — curated and locally approved.`
|
||||
: locale === 'ru'
|
||||
? `Лучшие места категории «${name}» в Мармарисе — с фильтрами по районам и ценам, проверено местными.`
|
||||
: `Marmaris'teki en iyi ${name.toLowerCase()} listesi — mahalle ve fiyata göre filtrele, yerel onaylılardan seç.`
|
||||
|
||||
return basicMetadata(title, description)
|
||||
}
|
||||
|
||||
export default async function DynamicCategoryPage({ params, searchParams }: PageProps) {
|
||||
const { locale, category: categorySlug } = await params
|
||||
setRequestLocale(locale)
|
||||
|
||||
Reference in New Issue
Block a user