import { redirect } from "next/navigation"; import { MotionFade } from "@/components/motion-fade"; import { RootDashboardShell } from "@/components/root/root-dashboard-shell"; import { SMTPSettingsForm } from "@/components/root/smtp-settings-form"; import { Button } from "@/components/ui/button"; import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth"; import { getMailSettingsFormValues } from "@/lib/app-config"; import { saveMailSettingsAction, sendTestEmailAction } from "./actions"; export const dynamic = "force-dynamic"; const copy = { title: "SMTP", subtitle: "Mailserver, Absender und Testempfaenger verwalten.", overview: "Uebersicht", maintenance: "Wartungsmodus", uiKit: "UI Kit", media: "Media", siteSettings: "Settings", smtp: "SMTP", contactProtection: "Contact Protection", portfolio: "Portfolio", logout: "Ausloggen", backToSite: "Zur Website", }; export default async function RootSMTPPage() { if (!isAdminAuthenticated()) { redirect("/root"); } async function logoutAction() { "use server"; clearAdminSessionCookie(); redirect("/root"); } const mailSettings = await getMailSettingsFormValues(); return ( )} >
); }