Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix IllustratedHeaderPageLayout.js padding bottom #25654

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/IllustratedHeaderPageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import themeColors from '../styles/themes/default';
import * as StyleUtils from '../styles/StyleUtils';
import useWindowDimensions from '../hooks/useWindowDimensions';
import FixedFooter from './FixedFooter';
import useNetwork from '../hooks/useNetwork';

const propTypes = {
...headerWithBackButtonPropTypes,
Expand All @@ -35,6 +36,7 @@ const defaultProps = {

function IllustratedHeaderPageLayout({backgroundColor, children, illustration, footer, ...propsToPassToHeader}) {
const {windowHeight} = useWindowDimensions();
const {isOffline} = useNetwork();
return (
<ScreenWrapper
style={[StyleUtils.getBackgroundColorStyle(backgroundColor)]}
Expand All @@ -50,7 +52,7 @@ function IllustratedHeaderPageLayout({backgroundColor, children, illustration, f
titleColor={backgroundColor === themeColors.appBG ? undefined : themeColors.textColorfulBackground}
iconFill={backgroundColor === themeColors.appBG ? undefined : themeColors.iconColorfulBackground}
/>
<View style={[styles.flex1, StyleUtils.getBackgroundColorStyle(themeColors.appBG)]}>
<View style={[styles.flex1, StyleUtils.getBackgroundColorStyle(themeColors.appBG), !isOffline ? safeAreaPaddingBottomStyle : {}]}>
<ScrollView
contentContainerStyle={safeAreaPaddingBottomStyle}
showsVerticalScrollIndicator={false}
Expand All @@ -66,7 +68,7 @@ function IllustratedHeaderPageLayout({backgroundColor, children, illustration, f
</View>
<View style={[styles.pt5]}>{children}</View>
</ScrollView>
{!_.isNull(footer) && <FixedFooter>{footer}</FixedFooter>}
{!_.isNull(footer) && <FixedFooter style={[styles.mtAuto, styles.pt2]}>{footer}</FixedFooter>}
Copy link
Contributor

@0xmiros 0xmiros Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: Why marginTop: 'auto' is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I just copy the FixedFooter style from two factor auth page, but I am not sure if it needed or not.

<FixedFooter style={[styles.mtAuto, styles.pt2]}>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this change, not necessary to fix the main issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xmiroslav removed.

</View>
</>
)}
Expand Down