diff options
Diffstat (limited to 'src/index.tsx')
| -rw-r--r-- | src/index.tsx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/index.tsx b/src/index.tsx index 37d6a5e..ba55bfe 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,17 +1,22 @@ import { createRoot } from "react-dom/client"; import { StrictMode, lazy, Suspense } from "react"; -import { kcContext } from "./keycloak-theme/kcContext"; +import { kcContext as kcLoginThemeContext } from "./keycloak-theme/login/kcContext"; const App = lazy(() => import("./App")); -const KcApp = lazy(() => import("./keycloak-theme/KcApp")); +const KcLoginThemeApp = lazy(() => import("./keycloak-theme/login/KcApp")); createRoot(document.getElementById("root")!).render( <StrictMode> <Suspense> - {kcContext === undefined ? - <App /> : - <KcApp kcContext={kcContext} /> - } + {(()=>{ + + if( kcLoginThemeContext !== undefined ){ + return <KcLoginThemeApp kcContext={kcLoginThemeContext} />; + } + + return <App />; + + })()} </Suspense> </StrictMode> ); |