Skip to content

Commit ba27b0a

Browse files
committed
minor updates.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent af2b4be commit ba27b0a

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

  • src/pages/iou/request/step/IOURequestStepScan

src/pages/iou/request/step/IOURequestStepScan/index.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -973,16 +973,13 @@ function IOURequestStepScan({
973973

974974
const [containerHeight, setContainerHeight] = useState(0);
975975
const [desktopUploadViewHeight, setDesktopUploadViewHeight] = useState(0);
976-
const [bannerHeight, setBannerHeight] = useState(0);
977-
const shouldHideBanner = bannerHeight + desktopUploadViewHeight + styles.uploadFileView(isSmallScreenWidth).paddingVertical * 2 > containerHeight;
976+
const [downloadAppBannerHeight, setDownloadAppBannerHeight] = useState(0);
977+
const shouldHideDownloadAppBanner = isMobile || downloadAppBannerHeight + desktopUploadViewHeight + styles.uploadFileView(isSmallScreenWidth).paddingVertical * 2 > containerHeight;
978978

979979
const desktopUploadView = () => (
980980
<View
981-
style={[!isMobile() && styles.alignItemsCenter, styles.justifyContentCenter]}
981+
style={[styles.alignItemsCenter, styles.justifyContentCenter]}
982982
onLayout={(e) => {
983-
if (isMobile()) {
984-
return;
985-
}
986983
setDesktopUploadViewHeight(e.nativeEvent.layout.height);
987984
}}
988985
>
@@ -1040,9 +1037,7 @@ function IOURequestStepScan({
10401037
{(isDraggingOverWrapper) => (
10411038
<View
10421039
onLayout={(event) => {
1043-
if (!isMobile()) {
1044-
setContainerHeight(event.nativeEvent.layout.height);
1045-
}
1040+
setContainerHeight(event.nativeEvent.layout.height);
10461041
if (!onLayout) {
10471042
return;
10481043
}
@@ -1079,7 +1074,7 @@ function IOURequestStepScan({
10791074
/>
10801075
)}
10811076
{/* We use isMobile() here to explicitly hide DownloadAppBanner component on both mobile web and native apps */}
1082-
{!isMobile() && !shouldHideBanner && <DownloadAppBanner onLayout={(e) => setBannerHeight(e.nativeEvent.layout.height)} />}
1077+
{!shouldHideDownloadAppBanner && <DownloadAppBanner onLayout={(e) => setDownloadAppBannerHeight(e.nativeEvent.layout.height)} />}
10831078
{ErrorModal}
10841079
{startLocationPermissionFlow && !!receiptFiles.length && (
10851080
<LocationPermissionModal

0 commit comments

Comments
 (0)