fix: resolve prisma v6 warning and next 15 form action typings
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { mockDb } from '@/lib/mockDb'
|
||||
import { deleteBlogPostAction } from '@/app/actions'
|
||||
import { Link } from '@/i18n/routing'
|
||||
import DeleteButton from '@/components/DeleteButton'
|
||||
import { Edit, Trash, Plus, FileText, CheckCircle, XCircle } from 'lucide-react'
|
||||
|
||||
export default async function AdminBlogPage() {
|
||||
@@ -97,17 +98,11 @@ export default async function AdminBlogPage() {
|
||||
<Edit className="w-4 h-4" />
|
||||
</Link>
|
||||
|
||||
<form action={async () => {
|
||||
<form action={async () => {
|
||||
'use server'
|
||||
await deleteBlogPostAction(post.id)
|
||||
}}>
|
||||
<button
|
||||
type="submit"
|
||||
className="p-1.5 bg-paper text-shutter hover:text-bougainvillea hover:bg-bougainvillea/5 rounded-lg border border-pine/10 hover:border-bougainvillea/25 transition shadow-sm"
|
||||
title="Sil"
|
||||
>
|
||||
<Trash className="w-4 h-4" />
|
||||
</button>
|
||||
<DeleteButton />
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
@@ -118,6 +113,14 @@ export default async function AdminBlogPage() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href="/admin/blog/new"
|
||||
className="inline-flex items-center gap-1.5 bg-turquoise hover:bg-turquoise/90 text-paper text-xs font-bold py-3 px-5 rounded-xl shadow-sm transition active:scale-95 duration-150"
|
||||
>
|
||||
<Plus className="w-4 h-4" />
|
||||
Yeni Yazı Ekle
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user