import { Layout } from "lucide-react"; import { createBox, deleteBox, toggleBox, updateBox } from "@/actions/admin-writeable-boxes"; import { StatusCard } from "@/components/admin/dashboard"; import { prisma } from "@/lib/prisma"; export const dynamic = "force-dynamic"; export const metadata = { title: "Writeable boxes" }; export default async function AdminWriteableBoxes() { const boxes = await prisma.websiteWriteableBoxes .findMany({ orderBy: [{ position: "asc" }, { id: "asc" }], take: 500, }) .catch(() => []); const activeCount = boxes.filter((b) => b.isActive).length; return (

Writeable Boxes

Content panels stored in website_writeable_boxes and ordered by position. Active boxes are shown on the public home page; hidden ones are kept here as drafts.

0 ? "ok" : "neutral"} hint="shown on the public home page" icon="✅" />

New box