Keep admin only at /root and remove localized root route
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-06 15:17:51 +01:00
parent d070c32a85
commit 5e326b7ca4
2 changed files with 1 additions and 9 deletions
-5
View File
@@ -1,5 +0,0 @@
import { redirect } from "next/navigation";
export default function LocalizedRootRedirectPage() {
redirect("/root");
}
+1 -4
View File
@@ -117,10 +117,7 @@ export default async function middleware(request: NextRequest) {
const isSuperAdmin = await isSuperAdminSessionValid(request);
const isRootBaseRoute = pathname === "/root" || pathname.startsWith("/root/");
const isRootRoute =
isRootBaseRoute ||
pathname === `/${locale}/root` ||
pathname.startsWith(`/${locale}/root/`);
const isRootRoute = isRootBaseRoute;
const isComingSoonRoute =
pathname === "/coming-soon" ||
pathname.startsWith("/coming-soon/") ||