chore: clean up scratch files and apply remaining updates

This commit is contained in:
AyrisAI
2026-07-13 14:17:57 +03:00
parent 9866413511
commit 53cbee0841
28 changed files with 986 additions and 284 deletions
+9 -18
View File
@@ -1,13 +1,14 @@
import { mockDb } from '@/lib/mockDb'
import BlogForm from './BlogForm'
import BlogPostForm from './BlogPostForm'
import { notFound } from 'next/navigation'
interface Props {
params: Promise<{ locale: string; id: string }>
}
export default async function AdminBlogEditPage({ params }: Props) {
const { id } = await params
export default async function AdminBlogPostEditPage({ params }: Props) {
const { locale, id } = await params
let post = null
if (id !== 'new') {
@@ -17,31 +18,21 @@ export default async function AdminBlogEditPage({ params }: Props) {
}
}
// 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 (
<div className="space-y-6 max-w-5xl">
<div className="space-y-6 max-w-4xl">
<div>
<h2 className="text-3xl font-heading font-extrabold text-pine lowercase">
{id === 'new' ? 'yeni blog yazısı' : 'yazıyı düzenle'}
{id === 'new' ? 'yeni yazı ekle' : 'yazıyı düzenle'}
</h2>
<p className="text-ink/65 text-xs font-medium mt-1">
{id === 'new'
? 'Yeni bir rehber veya gastronomi tanıtım yazısı oluşturun.'
: 'Mevcut blog yazısı içeriğini güncelleyin.'}
? 'Yeni bir blog yazısı oluşturun.'
: 'Mevcut blog yazısı bilgilerini güncelleyin.'}
</p>
</div>
<div className="bg-paper border border-pine/8 rounded-3xl shadow-sm p-6 sm:p-8">
<BlogForm
post={post}
listingOptions={listingOptions}
/>
<BlogPostForm post={post} />
</div>
</div>
)