Working with v7 (without account theme)
This commit is contained in:
+11
-6
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user