diff --git a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js index 973a0475846d..bcea33d9c366 100644 --- a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js @@ -76,6 +76,7 @@ function BaseValidateCodeForm(props) { const loginData = props.loginList[props.contactMethod]; const inputValidateCodeRef = useRef(); const validateLoginError = ErrorUtils.getEarliestErrorField(loginData, 'validateLogin'); + const shouldDisableResendValidateCode = props.network.isOffline || props.account.isLoading; useImperativeHandle(props.innerRef, () => ({ focus() { @@ -170,7 +171,7 @@ function BaseValidateCodeForm(props) { > - {props.translate('validateCodeForm.magicCodeNotReceived')} + {props.translate('validateCodeForm.magicCodeNotReceived')} {props.hasMagicCodeBeenSent && ( { if (!(inputValidateCodeRef.current && hasError && (props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED || props.account.isLoading))) { @@ -279,13 +280,13 @@ function BaseValidateCodeForm(props) { style={[styles.mt2]} onPress={resendValidateCode} underlayColor={themeColors.componentBG} - disabled={props.network.isOffline} + disabled={shouldDisableResendValidateCode} hoverDimmingValue={1} pressDimmingValue={0.2} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - + {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')}