diff --git a/src/components/CippComponents/CippTenantSelector.jsx b/src/components/CippComponents/CippTenantSelector.jsx index 735ecfe82d40..de58af87c29a 100644 --- a/src/components/CippComponents/CippTenantSelector.jsx +++ b/src/components/CippComponents/CippTenantSelector.jsx @@ -230,7 +230,13 @@ export const CippTenantSelector = (props) => { }); } } - }, [router.isReady, router.query.tenantFilter, tenantList.isSuccess, settings.currentTenant, settings.isInitialized]); + }, [ + router.isReady, + router.query.tenantFilter, + tenantList.isSuccess, + settings.currentTenant, + settings.isInitialized, + ]); // This effect ensures the tenant filter parameter is included in the URL when missing useEffect(() => { diff --git a/src/pages/_app.js b/src/pages/_app.js index a26f46d7f701..b9b16e9d3ecd 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -366,15 +366,13 @@ const App = (props) => { {(settings) => { - if (!settings.isInitialized) { - return null; // Don't render until settings are loaded - } + // Create theme even while initializing to avoid blank screen const theme = createTheme({ colorPreset: "orange", - direction: settings.direction, + direction: settings.direction || "ltr", paletteMode: settings.currentTheme?.value !== "browser" - ? settings.currentTheme?.value + ? settings.currentTheme?.value || "light" : preferredTheme, contrast: "high", });