Fix root auth prompt trigger and normalize maintenance route checks
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-06 14:54:10 +01:00
parent 5070487907
commit 2056fdc7f6
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ export function Footer() {
<Link
key={item.key}
href={`/${locale}${item.path}`}
prefetch={item.key === "root" ? false : undefined}
className="text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-zinc-100"
>
{tNav(item.key)}
+2
View File
@@ -52,6 +52,7 @@ export function Navbar() {
<Link
key={item.key}
href={`/${locale}${item.path}`}
prefetch={item.key === "root" ? false : undefined}
className="text-sm text-zinc-700 transition hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-zinc-100"
>
{t(item.key)}
@@ -87,6 +88,7 @@ export function Navbar() {
<Link
key={item.key}
href={`/${locale}${item.path}`}
prefetch={item.key === "root" ? false : undefined}
className="text-sm text-zinc-700 dark:text-zinc-300"
onClick={() => setIsOpen(false)}
>
+6 -1
View File
@@ -117,8 +117,13 @@ export default async function middleware(request: NextRequest) {
const isSuperAdmin = await isSuperAdminSessionValid(request);
const isRootRoute =
pathname === `/${locale}/root` || pathname.startsWith(`/${locale}/root/`);
pathname === "/root" ||
pathname.startsWith("/root/") ||
pathname === `/${locale}/root` ||
pathname.startsWith(`/${locale}/root/`);
const isComingSoonRoute =
pathname === "/coming-soon" ||
pathname.startsWith("/coming-soon/") ||
pathname === `/${locale}/coming-soon` ||
pathname.startsWith(`/${locale}/coming-soon/`);