keycloak-theme-react/src/index.tsx

18 lines
515 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-27 09:13:07 +00:00
import { kcContext } from "./keycloak-theme/kcContext";
2022-09-06 17:22:23 +00:00
const App = lazy(() => import("./App"));
2023-02-27 09:13:07 +00:00
const KcApp = lazy(() => import("./keycloak-theme/KcApp"));
2022-09-06 17:22:23 +00:00
createRoot(document.getElementById("root")!).render(
<StrictMode>
2023-02-27 09:13:07 +00:00
<Suspense>
{kcContext === undefined ?
<App /> :
<KcApp kcContext={kcContext} />
}
</Suspense>
</StrictMode>
2022-09-06 17:22:23 +00:00
);