diff --git a/apps/login/src/app/(login)/layout.tsx b/apps/login/src/app/(login)/layout.tsx index 1975b7c5e5a..c7c681f05fa 100644 --- a/apps/login/src/app/(login)/layout.tsx +++ b/apps/login/src/app/(login)/layout.tsx @@ -1,5 +1,6 @@ import "@/styles/globals.scss"; +import { Alert, AlertType } from "@/components/alert"; import { LanguageProvider } from "@/components/language-provider"; import { LanguageSwitcher } from "@/components/language-switcher"; import { Theme } from "@/components/theme"; @@ -23,7 +24,13 @@ export default async function RootLayout({ - Loading...}> + + Loading... + + } + >
) { +const useCache = process.env.DEBUG !== "true"; + +async function cacheWrapper(callback: Promise) { "use cache"; cacheLife("hours"); @@ -62,8 +64,6 @@ async function cacheWrapper(callback: Promise) { } export async function getBrandingSettings(organization?: string) { - const useCache = process.env.DEBUG !== "true"; - const callback = settingsService .getBrandingSettings({ ctx: makeReqCtx(organization) }, {}) .then((resp) => (resp.settings ? resp.settings : undefined)); @@ -72,8 +72,6 @@ export async function getBrandingSettings(organization?: string) { } export async function getLoginSettings(orgId?: string) { - const useCache = process.env.DEBUG !== "true"; - const callback = settingsService .getLoginSettings({ ctx: makeReqCtx(orgId) }, {}) .then((resp) => (resp.settings ? resp.settings : undefined)); @@ -108,8 +106,6 @@ export async function registerTOTP(userId: string) { } export async function getGeneralSettings() { - const useCache = process.env.DEBUG !== "true"; - const callback = settingsService .getGeneralSettings({}, {}) .then((resp) => resp.supportedLanguages); @@ -118,8 +114,6 @@ export async function getGeneralSettings() { } export async function getLegalAndSupportSettings(organization?: string) { - const useCache = process.env.DEBUG !== "true"; - const callback = settingsService .getLegalAndSupportSettings({ ctx: makeReqCtx(organization) }, {}) .then((resp) => (resp.settings ? resp.settings : undefined)); @@ -128,8 +122,6 @@ export async function getLegalAndSupportSettings(organization?: string) { } export async function getPasswordComplexitySettings(organization?: string) { - const useCache = process.env.DEBUG !== "true"; - const callback = settingsService .getPasswordComplexitySettings({ ctx: makeReqCtx(organization) }) .then((resp) => (resp.settings ? resp.settings : undefined));