From 59516d89ad7e9d160b6dbc25482eef718f68efbb Mon Sep 17 00:00:00 2001 From: Darya Umrikhina Date: Wed, 7 Aug 2024 14:09:31 +0400 Subject: [PATCH] Login:Src:App: change config method and redirect wizard --- packages/login/src/app/layout.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/login/src/app/layout.tsx b/packages/login/src/app/layout.tsx index d68a1193d1..c0755b2886 100644 --- a/packages/login/src/app/layout.tsx +++ b/packages/login/src/app/layout.tsx @@ -49,8 +49,6 @@ export default async function RootLayout({ return <>; } - const baseUrl = getBaseUrl(); - const cookieStore = cookies(); const systemTheme = cookieStore.get(SYSTEM_THEME_KEY); @@ -62,10 +60,9 @@ export default async function RootLayout({ const startOtherOperationsDate = new Date(); - const [settings, colorTheme, config] = await Promise.all([ + const [settings, colorTheme] = await Promise.all([ getSettings(), getColorTheme(), - getConfig(), ]); timers.otherOperations = @@ -75,9 +72,7 @@ export default async function RootLayout({ if (settings === "portal-not-found") { const hdrs = headers(); - const config = await ( - await fetch(`${baseUrl}/static/scripts/config.json`) - ).json(); + const config = await getConfig(); const host = hdrs.get("host"); @@ -92,7 +87,7 @@ export default async function RootLayout({ } if (typeof settings !== "string" && settings?.wizardToken) { - redirect(`wizard`); + redirectUrl = `wizard`; } if (