aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.tsx
diff options
context:
space:
mode:
authorGravatar garronej <[email protected]>2023-03-21 02:55:32 +0100
committerGravatar garronej <[email protected]>2023-03-21 02:55:32 +0100
commitdf766401002b6350bb06b0b6769d22b8b7240e6f (patch)
tree960cebcb599ca5ca6d93794e5d6606ba66c7374d /src/index.tsx
parentupdate setup (diff)
Working with v7 (without account theme)
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx17
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>
);