57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
// This file is auto-generated by the `update-kc-gen` command. Do not edit it manually.
|
|
// Hash: 612dc705f216ef0750f6fe7480dd13bcc1c0af561a77e7ce5ffd6a39e53d185d
|
|
|
|
|
|
/* eslint-disable */
|
|
|
|
// @ts-nocheck
|
|
|
|
// noinspection JSUnusedGlobalSymbols
|
|
|
|
import { lazy, Suspense, type ReactNode } from "react";
|
|
|
|
export type ThemeName = "auth-tombutcher-work";
|
|
|
|
export const themeNames: ThemeName[] = ["auth-tombutcher-work"];
|
|
|
|
export type KcEnvName = never;
|
|
|
|
export const kcEnvNames: KcEnvName[] = [];
|
|
|
|
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
|
|
|
/**
|
|
* NOTE: Do not import this type except maybe in your entrypoint.
|
|
* If you need to import the KcContext import it either from src/login/KcContext.ts or src/account/KcContext.ts.
|
|
* Depending on the theme type you are working on.
|
|
*/
|
|
export type KcContext =
|
|
| import("./login/KcContext").KcContext
|
|
;
|
|
|
|
declare global {
|
|
interface Window {
|
|
kcContext?: KcContext;
|
|
}
|
|
}
|
|
|
|
export const KcLoginPage = lazy(() => import("./login/KcPage"));
|
|
|
|
export function KcPage(
|
|
props: {
|
|
kcContext: KcContext;
|
|
fallback?: ReactNode;
|
|
}
|
|
) {
|
|
const { kcContext, fallback } = props;
|
|
return (
|
|
<Suspense fallback={fallback}>
|
|
{(() => {
|
|
switch (kcContext.themeType) {
|
|
case "login": return <KcLoginPage kcContext={kcContext} />;
|
|
}
|
|
})()}
|
|
</Suspense>
|
|
);
|
|
}
|