Update
This commit is contained in:
1 parent
5a42b618bd
commit
b6159180ea
10 files changed
+83
-59
No files matched your search
+1
-1
@@ -18,7 +18,7 @@
|
||||
"license": "MIT",
|
||||
"keywords": [],
|
||||
"dependencies": {
|
||||
"keycloakify": "10.0.0-rc.37",
|
||||
"keycloakify": "10.0.0-rc.40",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
|
||||
+7
-17
@@ -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 };
|
||||
@@ -1,11 +1,15 @@
|
||||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
import type { ExtendKcContext } from "keycloakify/account";
|
||||
import type { KcEnvName, ThemeName } from "../kc.gen";
|
||||
|
||||
export type KcContextExtraProperties = {};
|
||||
export type KcContextExtension = {
|
||||
themeName: ThemeName;
|
||||
properties: Record<KcEnvName, string> & {};
|
||||
};
|
||||
|
||||
export type KcContextExtraPropertiesPerPage = {};
|
||||
export type KcContextExtensionPerPage = {};
|
||||
|
||||
export type KcContext = ExtendKcContext<
|
||||
KcContextExtraProperties,
|
||||
KcContextExtraPropertiesPerPage
|
||||
KcContextExtension,
|
||||
KcContextExtensionPerPage
|
||||
>;
|
||||
Loaded 3 of 10 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user