2021-03-03 00:04:06 +01:00
|
|
|
|
|
|
|
import { memo } from "react";
|
2021-06-23 08:16:51 +02:00
|
|
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
2021-03-06 14:42:56 +01:00
|
|
|
import type { KcProps } from "./KcProps";
|
2021-03-03 00:04:06 +01:00
|
|
|
import { Login } from "./Login";
|
2021-03-04 18:15:48 +01:00
|
|
|
import { Register } from "./Register";
|
2021-03-06 14:42:56 +01:00
|
|
|
import { Info } from "./Info";
|
2021-03-07 14:57:53 +01:00
|
|
|
import { Error } from "./Error";
|
|
|
|
import { LoginResetPassword } from "./LoginResetPassword";
|
2021-03-07 15:37:37 +01:00
|
|
|
import { LoginVerifyEmail } from "./LoginVerifyEmail";
|
2021-04-08 15:41:40 +02:00
|
|
|
import { Terms } from "./Terms";
|
2021-06-14 21:19:46 +02:00
|
|
|
import { LoginOtp } from "./LoginOtp";
|
|
|
|
import { LoginUpdateProfile } from "./LoginUpdateProfile";
|
|
|
|
import { LoginIdpLinkConfirm } from "./LoginIdpLinkConfirm";
|
2021-03-03 00:04:06 +01:00
|
|
|
|
2021-06-23 08:16:51 +02:00
|
|
|
export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContextBase; } & KcProps) => {
|
2021-03-06 22:41:36 +01:00
|
|
|
switch (kcContext.pageId) {
|
2021-03-08 00:09:52 +01:00
|
|
|
case "login.ftl": return <Login {...{ kcContext, ...props }} />;
|
|
|
|
case "register.ftl": return <Register {...{ kcContext, ...props }} />;
|
|
|
|
case "info.ftl": return <Info {...{ kcContext, ...props }} />;
|
|
|
|
case "error.ftl": return <Error {...{ kcContext, ...props }} />;
|
|
|
|
case "login-reset-password.ftl": return <LoginResetPassword {...{ kcContext, ...props }} />;
|
|
|
|
case "login-verify-email.ftl": return <LoginVerifyEmail {...{ kcContext, ...props }} />;
|
2021-06-14 21:19:46 +02:00
|
|
|
case "terms.ftl": return <Terms {...{ kcContext, ...props }} />;
|
|
|
|
case "login-otp.ftl": return <LoginOtp {...{ kcContext, ...props }} />;
|
2021-06-14 19:06:31 +02:00
|
|
|
case "login-update-profile.ftl": return <LoginUpdateProfile {...{ kcContext, ...props }} />;
|
2021-06-14 21:19:46 +02:00
|
|
|
case "login-idp-link-confirm.ftl": return <LoginIdpLinkConfirm {...{ kcContext, ...props }} />;
|
2021-03-03 00:04:06 +01:00
|
|
|
}
|
|
|
|
});
|