Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/pages/iou/SplitExpensePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
const transactionDetails: Partial<TransactionDetails> = getTransactionDetails(transaction, undefined, currentPolicy) ?? {};
const transactionDetailsAmount = transactionDetails?.amount ?? 0;
const sumOfSplitExpenses = (draftTransaction?.comment?.splitExpenses ?? []).reduce((acc, item) => acc + (item.amount ?? 0), 0);
const splitExpenses = draftTransaction?.comment?.splitExpenses ?? [];

Check warning on line 112 in src/pages/iou/SplitExpensePage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

The 'splitExpenses' logical expression could make the dependencies of useEffect Hook (at line 148) change on every render. To fix this, wrap the initialization of 'splitExpenses' in its own useMemo() Hook

const currencySymbol = getCurrencySymbol(transactionDetails.currency ?? '') ?? transactionDetails.currency ?? CONST.CURRENCY.USD;

Expand Down Expand Up @@ -421,7 +421,6 @@
<ScreenWrapper
testID="SplitExpensePage"
shouldEnableMaxHeight={canUseTouchScreen()}
keyboardAvoidingViewBehavior="height"
shouldDismissKeyboardBeforeClose={false}
>
<FullPageNotFoundView shouldShow={!reportID || isEmptyObject(draftTransaction) || !isSplitAvailable}>
Expand Down
Loading