import Link from "next/link"; import { Megaphone } from "lucide-react"; import { notFound } from "next/navigation"; import { deleteAd, updateAd } from "@/actions/admin-ads"; import { prisma } from "@/lib/prisma"; export const dynamic = "force-dynamic"; export default async function EditAd({ params, }: { params: Promise<{ id: string }>; }) { const { id } = await params; let ad: Awaited> = null; try { ad = await prisma.websiteAds.findUnique({ where: { id: BigInt(id) } }); } catch { notFound(); } if (!ad) notFound(); return (

Edit advertisement

← Advertisements

); }