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
@@ -0,0 +1,23 @@
'use client'
import { deleteNeighborhoodAction } from '@/app/actions'
import { Trash } from 'lucide-react'
export function DeleteButton({ id }: { id: string }) {
return (
<button
type="button"
onClick={async () => {
if (!confirm('Bu mahalleyi silmek istediğinize emin misiniz?')) return
const res = await deleteNeighborhoodAction(id)
if (res?.error) {
alert(res.error)
}
}}
className="p-2 text-shutter hover:text-red-500 hover:bg-red-500/10 rounded-lg transition-colors"
title="Sil"
>
<Trash className="w-4 h-4" />
</button>
)
}