keycloak-theme-react/src/index.tsx

13 lines
447 B
TypeScript
Raw Normal View History

2022-09-06 17:22:23 +00:00
import { createRoot } from "react-dom/client";
import { StrictMode, lazy, Suspense } from "react";
2023-02-26 11:32:22 +00:00
import { kcContext } from "./keycloakTheme/kcContext";
2022-09-06 17:22:23 +00:00
const App = lazy(() => import("./App"));
2023-02-26 11:32:22 +00:00
const KcApp = lazy(() => import("./keycloakTheme/KcApp"));
2022-09-06 17:22:23 +00:00
createRoot(document.getElementById("root")!).render(
<StrictMode>
<Suspense>{kcContext === undefined ? <App /> : <KcApp kcContext={kcContext} />}</Suspense>
</StrictMode>,
);