Skip to content

Commit

Permalink
Update BaseLoginForm.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah authored Jan 27, 2024
1 parent 518f501 commit bfcc20f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/signin/LoginForm/BaseLoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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];
}

/**
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -330,7 +330,7 @@ function LoginForm(props) {
{props.translate('common.signInWith')}
</Text>

<View style={props.isSmallScreenWidth ? styles.loginButtonRowSmallScreen : styles.loginButtonRow}>
<View style={shouldUseNarrowLayout ? styles.loginButtonRowSmallScreen : styles.loginButtonRow}>
<View onMouseDown={(e) => e.preventDefault()}>
<AppleSignIn />
</View>
Expand Down

0 comments on commit bfcc20f

Please sign in to comment.