import { getTranslations } from "next-intl/server"; import { createEmailTemplate, deleteEmailTemplate, updateEmailTemplate, } from "@/actions/admin-email-templates"; import { prisma } from "@/lib/prisma"; export const dynamic = "force-dynamic"; export default async function AdminEmailTemplates() { const t = await getTranslations("pages.admin.emailTemplates"); let templates: Awaited> = []; try { templates = await prisma.emailTemplates.findMany({ orderBy: { name: "asc" } }); } catch { templates = []; } return (
✉️

{t("title")}

{t.rich("subtitle", { code: (chunks) => {chunks} })}

{t("newTemplate")}