aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.tsx
blob: 37d6a5ece87d6bfa56f1fa44ce16d858ef10a833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { createRoot } from "react-dom/client";
import { StrictMode, lazy, Suspense } from "react";
import { kcContext } from "./keycloak-theme/kcContext";

const App = lazy(() => import("./App"));
const KcApp = lazy(() => import("./keycloak-theme/KcApp"));

createRoot(document.getElementById("root")!).render(
    <StrictMode>
        <Suspense>
            {kcContext === undefined ?
                <App /> :
                <KcApp kcContext={kcContext} />
            }
        </Suspense>
    </StrictMode>
);