import Link from "next/link"; import { StatusCard } from "@/components/admin/dashboard"; import { prisma } from "@/lib/prisma"; export const dynamic = "force-dynamic"; export default async function AdminHelpQuestions() { let entries: Awaited< ReturnType > = []; try { entries = await prisma.websiteHelpCenterCategories.findMany({ orderBy: [{ position: "asc" }, { id: "asc" }], take: 500, }); } catch { entries = []; } const smallBoxes = entries.filter((e) => e.smallBox).length; const withButton = entries.filter((e) => e.buttonText).length; return (

Help Center

+ New entry

Help-center FAQ entries (website_help_center_categories). Shown to visitors on the public help page, ordered by position.

Entries

{entries.length === 0 ? (

No help-center entries yet.

) : ( {entries.map((e) => ( ))}
Pos. Name Button Small box
{e.position} {e.name} {e.buttonText || "—"} {e.smallBox ? "Yes" : "No"} Edit
)}
); }