chore: clean up scratch files and apply remaining updates
This commit is contained in:
@@ -3,11 +3,37 @@ import { mockDb } from '@/lib/mockDb'
|
||||
import ListingCard from '@/components/ListingCard'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { MapPin } from 'lucide-react'
|
||||
import type { Metadata } from 'next'
|
||||
import { basicMetadata } from '@/lib/seo'
|
||||
|
||||
interface NeighborhoodPageProps {
|
||||
params: Promise<{ locale: string; slug: string }>
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: NeighborhoodPageProps): Promise<Metadata> {
|
||||
const { locale, slug } = await params
|
||||
const neighborhood = await mockDb.getNeighborhoodBySlug(slug)
|
||||
if (!neighborhood) return {}
|
||||
|
||||
const name = locale === 'ru' ? neighborhood.nameRu : locale === 'en' ? neighborhood.nameEn : neighborhood.nameTr
|
||||
|
||||
const title =
|
||||
locale === 'en'
|
||||
? `${name}, Marmaris — Local Guide — Marmaris Local`
|
||||
: locale === 'ru'
|
||||
? `${name}, Мармарис — Местный гид — Marmaris Local`
|
||||
: `${name}, Marmaris — Mahalle Rehberi — Marmaris Local`
|
||||
|
||||
const description =
|
||||
locale === 'en'
|
||||
? `Discover the best restaurants, apart hotels and local businesses in ${name}, Marmaris.`
|
||||
: locale === 'ru'
|
||||
? `Лучшие рестораны, апарт-отели и заведения в районе ${name}, Мармарис.`
|
||||
: `${name}, Marmaris'teki en iyi restoranlar, apart oteller ve yerel işletmeler.`
|
||||
|
||||
return basicMetadata(title, description)
|
||||
}
|
||||
|
||||
export default async function NeighborhoodPage({ params }: NeighborhoodPageProps) {
|
||||
const { locale, slug } = await params
|
||||
setRequestLocale(locale)
|
||||
|
||||
Reference in New Issue
Block a user