Add dedicated local admin domain routing
This commit is contained in:
@@ -4,6 +4,7 @@ import { MotionFade } from "@/components/motion-fade";
|
||||
import { ContactProtectionForm } from "@/components/admin/contact-protection-form";
|
||||
import { AdminDashboardShell } from "@/components/admin/admin-dashboard-shell";
|
||||
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
|
||||
import { getAdminAppPath } from "@/lib/admin-routing";
|
||||
import { getContactProtectionFormValues } from "@/lib/app-config";
|
||||
|
||||
import { saveContactProtectionSettingsAction } from "./actions";
|
||||
@@ -27,14 +28,14 @@ const copy = {
|
||||
|
||||
export default async function AdminSMTPProtectionPage() {
|
||||
if (!(await isAdminAuthenticated())) {
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
await clearAdminSessionCookie();
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
const settings = await getContactProtectionFormValues();
|
||||
|
||||
Reference in New Issue
Block a user