From ff16e66275ff25e6452fee0e085e9ca9a6d50f41 Mon Sep 17 00:00:00 2001 From: garronej Date: Tue, 27 Sep 2022 21:30:33 +0200 Subject: [PATCH] #177: Provide a simple way to disable fetching of default resources --- src/lib/components/Error.tsx | 54 ++-- src/lib/components/IdpReviewUserProfile.tsx | 71 ++-- src/lib/components/Info.tsx | 76 +++-- src/lib/components/KcApp.tsx | 124 +++---- src/lib/components/Login.tsx | 340 ++++++++++---------- src/lib/components/LoginConfigTotp.tsx | 310 +++++++++--------- src/lib/components/LoginIdpLinkConfirm.tsx | 78 ++--- src/lib/components/LoginIdpLinkEmail.tsx | 54 ++-- src/lib/components/LoginOtp.tsx | 141 ++++---- src/lib/components/LoginPageExpired.tsx | 62 ++-- src/lib/components/LoginResetPassword.tsx | 115 ++++--- src/lib/components/LoginUpdatePassword.tsx | 202 ++++++------ src/lib/components/LoginUpdateProfile.tsx | 196 +++++------ src/lib/components/LoginVerifyEmail.tsx | 54 ++-- src/lib/components/LogoutConfirm.tsx | 100 +++--- src/lib/components/Register.tsx | 251 ++++++++------- src/lib/components/RegisterUserProfile.tsx | 111 ++++--- src/lib/components/Terms.tsx | 96 +++--- src/lib/components/UpdateUserProfile.tsx | 108 ++++--- 19 files changed, 1345 insertions(+), 1198 deletions(-) diff --git a/src/lib/components/Error.tsx b/src/lib/components/Error.tsx index 04124c1b..298bff06 100644 --- a/src/lib/components/Error.tsx +++ b/src/lib/components/Error.tsx @@ -4,31 +4,37 @@ import type { KcProps } from "./KcProps"; import type { KcContextBase } from "../getKcContext/KcContextBase"; import type { I18n } from "../i18n"; -const Error = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Error; i18n: I18n } & KcProps) => { - const { message, client } = kcContext; +const Error = memo( + ({ + kcContext, + i18n, + doFetchDefaultThemeResources = true, + ...props + }: { kcContext: KcContextBase.Error; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => { + const { message, client } = kcContext; - const { msg } = i18n; + const { msg } = i18n; - return ( -