From bfcc20f20a4f6bc96cc031d89be7a4785bafe5a1 Mon Sep 17 00:00:00 2001 From: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:52:03 +0100 Subject: [PATCH] Update BaseLoginForm.js --- src/pages/signin/LoginForm/BaseLoginForm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/signin/LoginForm/BaseLoginForm.js b/src/pages/signin/LoginForm/BaseLoginForm.js index 9914ad063a0b..e77ac963120d 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.js +++ b/src/pages/signin/LoginForm/BaseLoginForm.js @@ -97,7 +97,7 @@ function LoginForm(props) { const firstBlurred = useRef(false); const isFocused = useIsFocused(); const isLoading = useRef(false); - const {shouldUseNarrowLayout} = useResponsiveLayout(); + const {shouldUseNarrowLayout, isInModal} = useResponsiveLayout(); const {translate} = props; @@ -157,7 +157,7 @@ function LoginForm(props) { ); function getSignInWithStyles() { - return props.isSmallScreenWidth ? [styles.mt1] : [styles.mt5, styles.mb5]; + return shouldUseNarrowLayout ? [styles.mt1] : [styles.mt5, styles.mb5]; } /** @@ -211,7 +211,7 @@ function LoginForm(props) { return; } let focusTimeout; - if (shouldUseNarrowLayout) { + if (isInModal) { focusTimeout = setTimeout(() => input.current.focus(), CONST.ANIMATED_TRANSITION); } else { input.current.focus(); @@ -330,7 +330,7 @@ function LoginForm(props) { {props.translate('common.signInWith')} - + e.preventDefault()}>