Fix root auth prompt trigger and normalize maintenance route checks
CI / quality (push) Waiting to run
CI / quality (push) Waiting to run
This commit is contained in:
@@ -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)}
|
||||
|
||||
@@ -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
@@ -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/`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user