This commit is contained in:
+6
-1
@@ -23,6 +23,7 @@ import {
|
||||
resetAdminFailedAttempts,
|
||||
setAdminSessionCookie,
|
||||
} from "@/lib/admin-auth";
|
||||
import { routing } from "@/i18n/routing";
|
||||
import { getMaintenanceMode, setMaintenanceMode } from "@/lib/app-config";
|
||||
import { resolveLocale } from "@/lib/site-data";
|
||||
|
||||
@@ -86,8 +87,12 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
||||
const nextValue = formData.get("enabled") === "true";
|
||||
|
||||
await setMaintenanceMode(nextValue);
|
||||
revalidatePath("/", "layout");
|
||||
revalidatePath("/root");
|
||||
revalidatePath(`/${localeKey}/coming-soon`);
|
||||
for (const appLocale of routing.locales) {
|
||||
revalidatePath(`/${appLocale}`, "layout");
|
||||
revalidatePath(`/${appLocale}/coming-soon`);
|
||||
}
|
||||
redirect("/root");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user