Upgrade app to Next.js 16
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-13 15:50:37 +01:00
parent f14116b56c
commit e32ac4cacb
40 changed files with 1853 additions and 1157 deletions
+5 -4
View File
@@ -11,23 +11,24 @@ import { getLocalizedPath, resolveLocale } from "@/lib/locale";
type SiteLayoutProps = {
children: ReactNode;
params: {
params: Promise<{
locale: string;
};
}>;
};
export const dynamic = "force-dynamic";
export const revalidate = 0;
export default async function SiteLayout({ children, params: { locale } }: SiteLayoutProps) {
export default async function SiteLayout({ children, params }: SiteLayoutProps) {
noStore();
const { locale } = await params;
const localeKey = resolveLocale(locale);
const [maintenanceEnabled, mediaBindings] = await Promise.all([
getMaintenanceMode(),
getSiteSettingsMediaBindings(),
]);
const authenticated = isAdminAuthenticated();
const authenticated = await isAdminAuthenticated();
if (maintenanceEnabled && !authenticated) {
redirect(getLocalizedPath(localeKey, "/coming-soon"));