Revert "Add missing admin action files and navigation links"

This reverts commit 41be6835bf.
This commit is contained in:
Simo committed 2026-07-11 20:37:56 +02:00
1 parent 4a1e1115b3
commit 4d515bc400
338 files changed
+5949 -28144

No files matched your search

+6 -4
View File
@@ -6,7 +6,11 @@ import { prisma } from "@/lib/prisma";
export const dynamic = "force-dynamic";
export default async function EditAd({ params }: { params: Promise<{ id: string }> }) {
export default async function EditAd({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
let ad: Awaited<ReturnType<typeof prisma.websiteAds.findUnique>> = null;
try {
@@ -24,9 +28,7 @@ export default async function EditAd({ params }: { params: Promise<{ id: string
</div>
<div>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">Edit advertisement</h1>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">
<Link href="/admin/ads">← Advertisements</Link>
</p>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5"><Link href="/admin/ads">← Advertisements</Link></p>
</div>
</div>
<form action={updateAd} className="admin-card">
+1 -3
View File
@@ -11,9 +11,7 @@ export default function NewAd() {
</div>
<div>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">New advertisement</h1>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">
<Link href="/admin/ads">← Advertisements</Link>
</p>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5"><Link href="/admin/ads">← Advertisements</Link></p>
</div>
</div>
<form action={createAd} className="admin-card">
+3 -1
View File
@@ -18,7 +18,9 @@ export default async function AdminAds() {
ads = [];
}
const latest = ads[0]?.createdAt ? ads[0].createdAt.toISOString().slice(0, 10) : "—";
const latest = ads[0]?.createdAt
? ads[0].createdAt.toISOString().slice(0, 10)
: "—";
return (
<main>