Add dedicated local admin domain routing
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user