Fix maintenance mode gating for visitors and superadmin session
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-06 15:43:31 +01:00
parent 59bc4a6563
commit 4226c8bf51
4 changed files with 139 additions and 3 deletions
+6
View File
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";
import { unstable_noStore as noStore } from "next/cache";
import { NextIntlClientProvider } from "next-intl";
import { getMessages, setRequestLocale } from "next-intl/server";
import { notFound } from "next/navigation";
@@ -13,6 +14,9 @@ type LocaleLayoutProps = {
};
};
export const dynamic = "force-dynamic";
export const revalidate = 0;
export function generateStaticParams() {
return routing.locales.map((locale) => ({ locale }));
}
@@ -21,6 +25,8 @@ export default async function LocaleLayout({
children,
params: { locale },
}: LocaleLayoutProps) {
noStore();
if (!routing.locales.includes(locale as (typeof routing.locales)[number])) {
notFound();
}