keycloak-theme/src/kc.gen.tsx

50 lines
1.4 KiB
TypeScript
Raw Normal View History

2024-10-25 03:04:43 +02:00
// This file is auto-generated by the `update-kc-gen` command. Do not edit it manually.
2024-11-25 11:56:47 +01:00
// Hash: 09b09a6c36072d5cf2f8484ab3dc720d28ec8c126df1bafb0b2214a0139848c7
2024-07-27 17:11:30 +02:00
/* eslint-disable */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
import { lazy, Suspense, type ReactNode } from "react";
export type ThemeName = "keycloakify-starter";
export const themeNames: ThemeName[] = ["keycloakify-starter"];
export type KcEnvName = never;
export const kcEnvNames: KcEnvName[] = [];
export const kcEnvDefaults: Record<KcEnvName, string> = {};
2024-11-25 11:56:47 +01:00
/**
* 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.
*/
2024-10-25 03:04:43 +02:00
export type KcContext = import("./login/KcContext").KcContext;
2024-07-27 17:11:30 +02:00
declare global {
interface Window {
kcContext?: KcContext;
}
}
export const KcLoginPage = lazy(() => import("./login/KcPage"));
2024-10-25 03:04:43 +02:00
export function KcPage(props: { kcContext: KcContext; fallback?: ReactNode }) {
2024-07-27 17:11:30 +02:00
const { kcContext, fallback } = props;
return (
<Suspense fallback={fallback}>
{(() => {
switch (kcContext.themeType) {
2024-10-25 03:04:43 +02:00
case "login":
return <KcLoginPage kcContext={kcContext} />;
2024-07-27 17:11:30 +02:00
}
})()}
</Suspense>
2024-07-27 17:49:45 +02:00
);
2024-07-27 17:11:30 +02:00
}