import { mockDb } from '@/lib/mockDb' import BlogForm from './BlogForm' import { notFound } from 'next/navigation' interface Props { params: Promise<{ locale: string; id: string }> } export default async function AdminBlogEditPage({ params }: Props) { const { id } = await params let post = null if (id !== 'new') { post = await mockDb.getBlogPostById(id) if (!post) { notFound() } } // Fetch listings to link them to the blog post const listings = await mockDb.getListings() const listingOptions = listings.map(l => ({ value: l.id, label: `${l.nameTr} (${l.neighborhood?.nameTr})` })) return (
{id === 'new' ? 'Yeni bir rehber veya gastronomi tanıtım yazısı oluşturun.' : 'Mevcut blog yazısı içeriğini güncelleyin.'}