From ee34cf63f417923f46dd4dbfd4a488615edf76b4 Mon Sep 17 00:00:00 2001 From: Pravinath Date: Fri, 17 Jul 2026 23:18:51 +0530 Subject: [PATCH] fix: hoist static info label JSX to module scope --- .../step-based-flow/authenticators.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/features/admin.applications.v1/components/settings/sign-on-methods/step-based-flow/authenticators.tsx b/features/admin.applications.v1/components/settings/sign-on-methods/step-based-flow/authenticators.tsx index fb5694d1a0c..9e7dd2ac2b3 100644 --- a/features/admin.applications.v1/components/settings/sign-on-methods/step-based-flow/authenticators.tsx +++ b/features/admin.applications.v1/components/settings/sign-on-methods/step-based-flow/authenticators.tsx @@ -35,6 +35,12 @@ import { ApplicationManagementConstants } from "../../../../constants/applicatio import { AuthenticationStepInterface } from "../../../../models/application"; import { SignInMethodUtils } from "../../../../utils/sign-in-method-utils"; +const INFO_LABEL: JSX.Element = ( + +); + /** * Proptypes for the authenticators component. */ @@ -187,12 +193,6 @@ export const Authenticators: FunctionComponent = ( * @returns React element. */ const resolvePopupContent = (authenticator: GenericAuthenticatorInterface): ReactElement => { - const InfoLabel: JSX.Element = ( - - ); - if ( authenticator.category === AuthenticatorCategories.SECOND_FACTOR || authenticator.category === AuthenticatorCategories.TWO_FACTOR_CUSTOM @@ -201,7 +201,7 @@ export const Authenticators: FunctionComponent = ( <> { currentStep === 0 ? ( - { InfoLabel } + { INFO_LABEL } { applicationConfig.signInMethod.authenticatorSelection.messages .secondFactorDisabledInFirstStep ?? @@ -214,7 +214,7 @@ export const Authenticators: FunctionComponent = ( ) : ( - { InfoLabel } + { INFO_LABEL } { applicationConfig.signInMethod.authenticatorSelection.messages .secondFactorDisabled ?? ( @@ -244,7 +244,7 @@ export const Authenticators: FunctionComponent = ( <> { currentStep === 0 ? ( - { InfoLabel } + { INFO_LABEL } { t( "applications:edit.sections" + @@ -255,7 +255,7 @@ export const Authenticators: FunctionComponent = ( ) : ( - { InfoLabel } + { INFO_LABEL } { t( "applications:edit.sections" + @@ -270,7 +270,7 @@ export const Authenticators: FunctionComponent = ( } else if (authenticator.category === AuthenticatorCategories.SOCIAL) { return ( - { InfoLabel } + { INFO_LABEL } { t( "applications:edit.sections.signOnMethod.sections." + @@ -291,7 +291,7 @@ export const Authenticators: FunctionComponent = ( return ( - { InfoLabel } + { INFO_LABEL } { t( @@ -307,7 +307,7 @@ export const Authenticators: FunctionComponent = ( .ACTIVE_SESSION_LIMIT_HANDLER_AUTHENTICATOR_NAME) { return ( - { InfoLabel } + { INFO_LABEL } { (authenticationSteps[currentStep]?.options?.length !== 0)