feat: implement dynamic categories, admin category CRUD, fix routing and cleanup

This commit is contained in:
AyrisAI
2026-07-13 13:51:48 +03:00
parent 2f2dafcfb9
commit 5b44c78396
54 changed files with 3619 additions and 473 deletions
+37
View File
@@ -0,0 +1,37 @@
import { mockDb } from '@/lib/mockDb'
import { notFound } from 'next/navigation'
import EventFormClient from './EventFormClient'
interface Props {
params: Promise<{ locale: string; id: string }>
}
export default async function AdminEventDetailPage({ params }: Props) {
const { id } = await params
let event = null
if (id !== 'new') {
event = await mockDb.getEventById(id)
if (!event) {
notFound()
}
}
// Get listings so the admin can associate the event with a venue
const listings = await mockDb.getListings()
return (
<div className="max-w-3xl space-y-6">
<div>
<h2 className="text-3xl font-heading font-extrabold text-pine lowercase">
{id === 'new' ? 'yeni etkinlik ekle' : 'etkinliği düzenle'}
</h2>
<p className="text-ink/65 text-xs font-medium mt-1">
Etkinlik adını, tarih aralığını ve sponsorluk durumunu belirtin. Kapak görseli eklemeyi unutmayın.
</p>
</div>
<EventFormClient event={event} listings={listings} />
</div>
)
}