Skip to content

Commit

Permalink
add windowHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Nov 16, 2023
1 parent 543f68c commit d489f94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/signin/SignInPageLayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {withSafeAreaInsets} from 'react-native-safe-area-context';
import SignInGradient from '@assets/images/home-fade-gradient.svg';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import usePrevious from '@hooks/usePrevious';
import useWindowDimensions from '@hooks/useWindowDimensions';
import compose from '@libs/compose';
import SignInPageHero from '@pages/signin/SignInPageHero';
import styles from '@styles/styles';
Expand Down Expand Up @@ -61,9 +62,10 @@ function SignInPageLayout(props) {
const prevPreferredLocale = usePrevious(props.preferredLocale);
let containerStyles = [styles.flex1, styles.signInPageInner];
let contentContainerStyles = [styles.flex1, styles.flexRow];
const {windowHeight} = useWindowDimensions();

// To scroll on both mobile and web, we need to set the container height manually
const containerHeight = props.windowHeight - props.insets.top - props.insets.bottom;
const containerHeight = windowHeight - props.insets.top - props.insets.bottom;

if (props.shouldShowSmallScreen) {
containerStyles = [styles.flex1];
Expand Down

0 comments on commit d489f94

Please sign in to comment.