Add dedicated local admin domain routing

This commit is contained in:
MOH
2026-03-13 17:48:45 +01:00
parent bfd7adccac
commit fef44ded80
47 changed files with 260 additions and 107 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { redirect } from "next/navigation";
import { MotionFade } from "@/components/motion-fade";
import { AdminDashboardShell } from "@/components/admin/admin-dashboard-shell";
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
import { getAdminAppPath } from "@/lib/admin-routing";
import { getMaintenanceMode } from "@/lib/app-config";
import { AppCard } from "@/components/ui/app-card";
import { Badge } from "@/components/ui/badge";
@@ -31,7 +32,7 @@ export default async function AdminMaintenancePage() {
const authenticated = await isAdminAuthenticated();
if (!authenticated) {
redirect("/");
redirect(getAdminAppPath("/"));
}
const maintenanceEnabled = await getMaintenanceMode();
@@ -39,7 +40,7 @@ export default async function AdminMaintenancePage() {
"use server";
await clearAdminSessionCookie();
redirect("/");
redirect(getAdminAppPath("/"));
}
return (