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 { UiKitShowcase } from "@/components/ui/ui-kit-showcase";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -24,14 +25,14 @@ export default async function AdminUiKitPage() {
|
||||
const authenticated = await isAdminAuthenticated();
|
||||
|
||||
if (!authenticated) {
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
await clearAdminSessionCookie();
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user