Implement a getter for kcContext

This commit is contained in:
garronej
2021-06-23 08:16:51 +02:00
parent 7123edc986
commit e3b41c9bd1
22 changed files with 326 additions and 297 deletions

View File

@ -1,6 +1,6 @@
import { memo } from "react";
import type { KcContext } from "../KcContext";
import type { KcContextBase } from "../getKcContext/KcContextBase";
import type { KcProps } from "./KcProps";
import { Login } from "./Login";
import { Register } from "./Register";
@ -13,7 +13,7 @@ import { LoginOtp } from "./LoginOtp";
import { LoginUpdateProfile } from "./LoginUpdateProfile";
import { LoginIdpLinkConfirm } from "./LoginIdpLinkConfirm";
export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContext; } & KcProps) => {
export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContextBase; } & KcProps) => {
switch (kcContext.pageId) {
case "login.ftl": return <Login {...{ kcContext, ...props }} />;
case "register.ftl": return <Register {...{ kcContext, ...props }} />;