Skip to content

Commit 931b590

Browse files
authored
Merge pull request Expensify#59424 from linhvovan29546/fix/58556-scan-page-bottom-button-misaligned
fix: scan page bottom button misaligned on mweb
2 parents 13b5427 + ce2c1f6 commit 931b590

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -834,22 +834,20 @@ function IOURequestStepScan({
834834
height={CONST.RECEIPT.SHUTTER_SIZE}
835835
/>
836836
</PressableWithFeedback>
837-
{hasFlash && (
838-
<PressableWithFeedback
839-
role={CONST.ROLE.BUTTON}
840-
accessibilityLabel={translate('receipt.flash')}
841-
style={[styles.alignItemsEnd]}
842-
disabled={cameraPermissionStatus !== RESULTS.GRANTED}
843-
onPress={() => setFlash((prevFlash) => !prevFlash)}
844-
>
845-
<Icon
846-
height={32}
847-
width={32}
848-
src={flash ? Expensicons.Bolt : Expensicons.boltSlash}
849-
fill={theme.textSupporting}
850-
/>
851-
</PressableWithFeedback>
852-
)}
837+
<PressableWithFeedback
838+
role={CONST.ROLE.BUTTON}
839+
accessibilityLabel={translate('receipt.flash')}
840+
style={[styles.alignItemsEnd, !hasFlash && styles.opacity0]}
841+
disabled={cameraPermissionStatus !== RESULTS.GRANTED || !hasFlash}
842+
onPress={() => setFlash((prevFlash) => !prevFlash)}
843+
>
844+
<Icon
845+
height={32}
846+
width={32}
847+
src={flash ? Expensicons.Bolt : Expensicons.boltSlash}
848+
fill={theme.textSupporting}
849+
/>
850+
</PressableWithFeedback>
853851
</View>
854852
{startLocationPermissionFlow && !!fileResize && (
855853
<LocationPermissionModal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ function IOURequestStepScan({
917917
wrapperStyle={styles.productTrainingTooltipWrapper}
918918
shiftVertical={-elementTop}
919919
>
920-
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
920+
<View style={[styles.flex1, !isMobile() && styles.alignItemsCenter, styles.justifyContentCenter]}>
921921
{!(isDraggingOver ?? isDraggingOverWrapper) && (isMobile() ? mobileCameraView() : desktopUploadView())}
922922
</View>
923923
</EducationalTooltip>

0 commit comments

Comments
 (0)