Update kc.gen

This commit is contained in:
Joseph Garrone 2024-07-27 17:36:39 +02:00
parent a2d7634fe5
commit 581ffcff6e

View File

@ -20,7 +20,9 @@ export const kcEnvNames: KcEnvName[] = [];
export const kcEnvDefaults: Record<KcEnvName, string> = {}; export const kcEnvDefaults: Record<KcEnvName, string> = {};
type KcContext = import("./login/KcContext").KcContext; type KcContext =
| import("./login/KcContext").KcContext
;
declare global { declare global {
interface Window { interface Window {
@ -30,18 +32,22 @@ declare global {
export const KcLoginPage = lazy(() => import("./login/KcPage")); export const KcLoginPage = lazy(() => import("./login/KcPage"));
export function KcPage(props: { kcContext: KcContext; fallback?: ReactNode }) { export function KcPage(
props: {
kcContext: KcContext;
fallback?: ReactNode;
}
) {
const { kcContext, fallback } = props; const { kcContext, fallback } = props;
return ( return (
<Suspense fallback={fallback}> <Suspense fallback={fallback}>
{(() => { {(() => {
switch (kcContext.themeType) { switch (kcContext.themeType) {
case "login": case "login": return <KcLoginPage kcContext={kcContext} />;
return <KcLoginPage kcContext={kcContext} />;
} }
})()} })()}
</Suspense> </Suspense>
); )
} }
/* prettier-ignore-end */ /* prettier-ignore-end */