From ac97fb75b04c1f883671a155d8e2eda541070ce1 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Wed, 9 Nov 2022 15:52:29 +0800 Subject: [PATCH] refactor(console): enabled verification code checkbox when sign-up identifier set to none (#2360) --- .../components/SignInMethodEditBox/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignInTab/components/SignInMethodEditBox/index.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignInTab/components/SignInMethodEditBox/index.tsx index 86adb772b..8d94cc994 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignInTab/components/SignInMethodEditBox/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignInTab/components/SignInMethodEditBox/index.tsx @@ -134,9 +134,7 @@ const SignInMethodEditBox = ({ signInMethod.identifier !== SignInIdentifier.Username && !isSignUpPasswordRequired } isVerificationCodeCheckable={ - (isSignUpPasswordRequired && isSignUpVerificationRequired) || - // Note: the next line is used to handle the case when the sign-up identifier is `Username` - (isSignUpPasswordRequired && signInMethod.identifier !== SignInIdentifier.Username) + !(isSignUpVerificationRequired && !isSignUpPasswordRequired) } isDeletable={!requiredSignInIdentifiers.includes(signInMethod.identifier)} onVerificationStateChange={(identifier, verification, checked) => {