From 23fe5cae52f052b00e4222cf4fb245565aba904f Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Thu, 7 Sep 2023 23:00:48 +0530 Subject: [PATCH] made the fix specific to safari --- src/components/IllustratedHeaderPageLayout.js | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/IllustratedHeaderPageLayout.js b/src/components/IllustratedHeaderPageLayout.js index 6634281ec495..87cf2e68403b 100644 --- a/src/components/IllustratedHeaderPageLayout.js +++ b/src/components/IllustratedHeaderPageLayout.js @@ -9,8 +9,10 @@ import ScreenWrapper from './ScreenWrapper'; import styles from '../styles/styles'; 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'; +import * as Browser from '../libs/Browser'; const propTypes = { ...headerWithBackButtonPropTypes, @@ -35,12 +37,14 @@ const defaultProps = { function IllustratedHeaderPageLayout({backgroundColor, children, illustration, footer, ...propsToPassToHeader}) { const {isOffline} = useNetwork(); + const {isSmallScreenWidth, windowHeight} = useWindowDimensions(); + const appBGColor = StyleUtils.getBackgroundColorStyle(themeColors.appBG); return ( {({safeAreaPaddingBottomStyle}) => ( <> @@ -50,16 +54,19 @@ function IllustratedHeaderPageLayout({backgroundColor, children, illustration, f titleColor={backgroundColor === themeColors.appBG ? undefined : themeColors.textColorfulBackground} iconFill={backgroundColor === themeColors.appBG ? undefined : themeColors.iconColorfulBackground} /> - - {/* Safari on ios has a bug where overscrolling the page scrollview shows green the background color. This is a workaround to fix that. https://github.com/Expensify/App/issues/23422#issuecomment-1666890994 */} - - - - + + {/* Safari on ios/mac has a bug where overscrolling the page scrollview shows green the background color. This is a workaround to fix that. https://github.com/Expensify/App/issues/23422 */} + {Browser.isSafari() && ( + + + + + )} + {!Browser.isSafari() && } - {children} + {children} - {!_.isNull(footer) && {footer}} + {!_.isNull(footer) && {footer}} )}