import { mockDb } from '@/lib/mockDb' import ListingForm from './ListingForm' import { notFound } from 'next/navigation' interface Props { params: Promise<{ locale: string; id: string }> } export default async function AdminListingEditPage({ params }: Props) { const { locale, id } = await params const categories = await mockDb.getCategories() const neighborhoods = await mockDb.getNeighborhoods() let listing = null if (id !== 'new') { listing = await mockDb.getListingById(id) if (!listing) { notFound() } } const categoryOptions = categories.map(c => ({ value: c.id, label: c.nameTr, slug: c.slug })) const neighborhoodOptions = neighborhoods.map(n => ({ value: n.id, label: n.nameTr, slug: n.slug })) return (

{id === 'new' ? 'yeni mekan ekle' : 'mekanı düzenle'}

{id === 'new' ? 'Rehbere eklenecek yeni işletme bilgilerini girin.' : 'Mevcut mekan bilgilerini güncelleyin.'}

) }