Update
This commit is contained in:
parent
5a42b618bd
commit
b6159180ea
10 changed files with 83 additions and 59 deletions
|
|
@ -1,21 +1,12 @@
|
|||
import { Suspense, lazy } from "react";
|
||||
import { Suspense } from "react";
|
||||
import type { ClassKey } from "keycloakify/account";
|
||||
import type { KcContext } from "./KcContext";
|
||||
import { useI18n } from "./i18n";
|
||||
import Fallback from "keycloakify/account/Fallback";
|
||||
import Template from "keycloakify/account/Template";
|
||||
const Fallback = lazy(() => import("keycloakify/account/Fallback"));
|
||||
|
||||
const classes = {} satisfies { [key in ClassKey]?: string };
|
||||
|
||||
export default function KcApp(props: { kcContext: KcContext }) {
|
||||
const { kcContext } = props;
|
||||
|
||||
const i18n = useI18n({ kcContext });
|
||||
|
||||
if (i18n === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense>
|
||||
{(() => {
|
||||
|
|
@ -23,12 +14,9 @@ export default function KcApp(props: { kcContext: KcContext }) {
|
|||
default:
|
||||
return (
|
||||
<Fallback
|
||||
{...{
|
||||
kcContext,
|
||||
i18n,
|
||||
classes,
|
||||
Template
|
||||
}}
|
||||
kcContext={kcContext}
|
||||
classes={classes}
|
||||
Template={Template}
|
||||
doUseDefaultCss={true}
|
||||
/>
|
||||
);
|
||||
|
|
@ -37,3 +25,5 @@ export default function KcApp(props: { kcContext: KcContext }) {
|
|||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
const classes = {} satisfies { [key in ClassKey]?: string };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue