Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenjaHorbach committed Oct 9, 2023
1 parent b035e39 commit 2472b0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction,

const isScanning = TransactionUtils.hasReceipt(transaction) && TransactionUtils.isReceiptBeingScanned(transaction);

const shouldShowThreeDotsButton = isActionOwner && !isSettled && !isApproved;
const canModifyRequest = isActionOwner && !isSettled && !isApproved;

useEffect(() => {
if (shouldShowThreeDotsButton) {
if (canModifyRequest) {
return;
}

setIsDeleteModalVisible(false);
}, [shouldShowThreeDotsButton]);
}, [canModifyRequest]);

return (
<>
<View style={[styles.pl0]}>
<HeaderWithBackButton
shouldShowAvatarWithDisplay
shouldShowPinButton={false}
shouldShowThreeDotsButton={shouldShowThreeDotsButton}
shouldShowThreeDotsButton={canModifyRequest}
threeDotsMenuItems={[
...(TransactionUtils.hasReceipt(transaction)
? []
Expand Down

0 comments on commit 2472b0b

Please sign in to comment.