Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomanjyotisa committed Oct 11, 2024
1 parent 7f557e0 commit 3a08cff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ function MoneyRequestConfirmationList({
const prevRate = usePrevious(rate);

const currency = (mileageRate as MileageRate)?.currency ?? policyCurrency;
const prevCurrency = usePrevious(currency);

// A flag for showing the categories field
const shouldShowCategories = (isPolicyExpenseChat || isTypeInvoice) && (!!iouCategory || OptionsListUtils.hasEnabledOptions(Object.values(policyCategories ?? {})));
Expand Down Expand Up @@ -292,8 +293,6 @@ function MoneyRequestConfirmationList({
const distance = TransactionUtils.getDistanceInMeters(transaction, unit);
const prevDistance = usePrevious(distance);

const prevCurrency = usePrevious(currency);

const shouldCalculateDistanceAmount = isDistanceRequest && (iouAmount === 0 || prevRate !== rate || prevDistance !== distance || prevCurrency !== currency);

const hasRoute = TransactionUtils.hasRoute(transaction, isDistanceRequest);
Expand Down

0 comments on commit 3a08cff

Please sign in to comment.