Skip to content

Commit 2ef6fb8

Browse files
committed
minor fix
1 parent bab8d3d commit 2ef6fb8

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ function TransactionPreviewContent({
161161
const shouldShowIOUHeader = !!from && !!to;
162162

163163
// If available, retrieve the split share from the splits object of the transaction, if not, display an even share.
164+
const actorAccountID = action?.actorAccountID;
164165
const splitShare = useMemo(() => {
165166
if (!shouldShowSplitShare) {
166167
return 0;
@@ -183,8 +184,19 @@ function TransactionPreviewContent({
183184
}
184185
}
185186

186-
return calculateAmount(isReportAPolicyExpenseChat ? 1 : originalParticipantCount - 1, amount ?? 0, requestCurrency ?? '', action?.actorAccountID === sessionAccountID);
187-
}, [shouldShowSplitShare, isReportAPolicyExpenseChat, participantAccountIDs.length, transaction?.comment?.splits, amount, requestCurrency, sessionAccountID, isBillSplit, action]);
187+
return calculateAmount(isReportAPolicyExpenseChat ? 1 : originalParticipantCount - 1, amount ?? 0, requestCurrency ?? '', actorAccountID === sessionAccountID);
188+
}, [
189+
shouldShowSplitShare,
190+
isReportAPolicyExpenseChat,
191+
participantAccountIDs.length,
192+
transaction?.comment?.splits,
193+
amount,
194+
requestCurrency,
195+
sessionAccountID,
196+
isBillSplit,
197+
action,
198+
actorAccountID,
199+
]);
188200

189201
const shouldWrapDisplayAmount = !(isBillSplit || shouldShowMerchantOrDescription || isTransactionScanning);
190202
const previewTextViewGap = (shouldShowCategoryOrTag || !shouldWrapDisplayAmount) && styles.gap2;

0 commit comments

Comments
 (0)