Skip to content

Commit

Permalink
fix: redundant padding below money report header
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jun 27, 2024
1 parent 4ee43a3 commit c5fe929
Showing 1 changed file with 49 additions and 47 deletions.
96 changes: 49 additions & 47 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,53 +376,55 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
</View>
)}
</HeaderWithBackButton>
<View style={[isMoreContentShown && [styles.dFlex, styles.flexColumn, styles.borderBottom], styles.ph5, styles.pb3, styles.gap3]}>
{shouldShowSettlementButton && shouldUseNarrowLayout && (
<SettlementButton
currency={moneyRequestReport.currency}
confirmApproval={confirmApproval}
policyID={moneyRequestReport.policyID}
chatReportID={moneyRequestReport.chatReportID}
iouReport={moneyRequestReport}
onPress={confirmPayment}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
formattedAmount={!hasOnlyHeldExpenses ? displayedAmount : ''}
shouldDisableApproveButton={shouldDisableApproveButton}
isDisabled={isOffline && !canAllowSettlement}
isLoading={!isOffline && !canAllowSettlement}
/>
)}
{shouldShowSubmitButton && shouldUseNarrowLayout && (
<Button
medium
success={isWaitingForSubmissionFromCurrentUser}
text={translate('common.submit')}
style={[styles.w100, styles.pr0]}
onPress={() => IOU.submitReport(moneyRequestReport)}
isDisabled={shouldDisableSubmitButton}
/>
)}
{shouldShowMarkAsCashButton && shouldUseNarrowLayout && (
<Button
medium
success
text={translate('iou.markAsCash')}
style={[styles.w100, styles.pr0]}
onPress={markAsCash}
/>
)}
{shouldShowNextStep && <MoneyReportHeaderStatusBar nextStep={nextStep} />}
{statusBarProps && (
<MoneyRequestHeaderStatusBar
title={statusBarProps.title}
description={statusBarProps.description}
danger={statusBarProps.danger}
/>
)}
</View>
{isMoreContentShown && (
<View style={[styles.dFlex, styles.flexColumn, styles.gap3, styles.pb3, styles.ph5, styles.borderBottom]}>
{shouldShowSettlementButton && shouldUseNarrowLayout && (
<SettlementButton
currency={moneyRequestReport.currency}
confirmApproval={confirmApproval}
policyID={moneyRequestReport.policyID}
chatReportID={moneyRequestReport.chatReportID}
iouReport={moneyRequestReport}
onPress={confirmPayment}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
formattedAmount={!hasOnlyHeldExpenses ? displayedAmount : ''}
shouldDisableApproveButton={shouldDisableApproveButton}
isDisabled={isOffline && !canAllowSettlement}
isLoading={!isOffline && !canAllowSettlement}
/>
)}
{shouldShowSubmitButton && shouldUseNarrowLayout && (
<Button
medium
success={isWaitingForSubmissionFromCurrentUser}
text={translate('common.submit')}
style={[styles.w100, styles.pr0]}
onPress={() => IOU.submitReport(moneyRequestReport)}
isDisabled={shouldDisableSubmitButton}
/>
)}
{shouldShowMarkAsCashButton && shouldUseNarrowLayout && (
<Button
medium
success
text={translate('iou.markAsCash')}
style={[styles.w100, styles.pr0]}
onPress={markAsCash}
/>
)}
{shouldShowNextStep && <MoneyReportHeaderStatusBar nextStep={nextStep} />}
{statusBarProps && (
<MoneyRequestHeaderStatusBar
title={statusBarProps.title}
description={statusBarProps.description}
danger={statusBarProps.danger}
/>
)}
</View>
)}
{isHoldMenuVisible && requestType !== undefined && (
<ProcessMoneyReportHoldMenu
nonHeldAmount={!hasOnlyHeldExpenses ? nonHeldAmount : undefined}
Expand Down

0 comments on commit c5fe929

Please sign in to comment.