Update keycloakify
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
/* prettier-ignore-start */
|
||||
// This file is auto-generated by the `update-kc-gen` command. Do not edit it manually.
|
||||
// Hash: 52e835881710cf6fd39c1589bb9282feccdcf06c9547d41c919576489f251d2f
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
@ -6,8 +7,6 @@
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
// This file is auto-generated by Keycloakify
|
||||
|
||||
import { lazy, Suspense, type ReactNode } from "react";
|
||||
|
||||
export type ThemeName = "keycloakify-starter";
|
||||
@ -20,9 +19,7 @@ export const kcEnvNames: KcEnvName[] = [];
|
||||
|
||||
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
||||
|
||||
export type KcContext =
|
||||
| import("./login/KcContext").KcContext
|
||||
;
|
||||
export type KcContext = import("./login/KcContext").KcContext;
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@ -32,22 +29,16 @@ declare global {
|
||||
|
||||
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;
|
||||
return (
|
||||
<Suspense fallback={fallback}>
|
||||
{(() => {
|
||||
switch (kcContext.themeType) {
|
||||
case "login": return <KcLoginPage kcContext={kcContext} />;
|
||||
case "login":
|
||||
return <KcLoginPage kcContext={kcContext} />;
|
||||
}
|
||||
})()}
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
/* prettier-ignore-end */
|
||||
|
@ -2,9 +2,7 @@ import { i18nBuilder } from "keycloakify/login";
|
||||
import type { ThemeName } from "../kc.gen";
|
||||
|
||||
/** @see: https://docs.keycloakify.dev/i18n */
|
||||
const { useI18n, ofTypeI18n } = i18nBuilder
|
||||
.withThemeName<ThemeName>()
|
||||
.build();
|
||||
const { useI18n, ofTypeI18n } = i18nBuilder.withThemeName<ThemeName>().build();
|
||||
|
||||
type I18n = typeof ofTypeI18n;
|
||||
|
||||
|
Reference in New Issue
Block a user