Skip to content

Commit

Permalink
removed lodash functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Dec 31, 2023
1 parent 60790aa commit 689c227
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/DistanceEReceipt.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'lodash';
import React, {useMemo} from 'react';
import {ScrollView, View} from 'react-native';
import EReceiptBackground from '@assets/images/eReceipt_background.svg';
Expand Down Expand Up @@ -37,12 +36,10 @@ function DistanceEReceipt({transaction}: DistanceEReceiptProps) {
const sortedWaypoints = useMemo<WaypointCollection>(
() =>
// The waypoint keys are sometimes out of order
_.chain(waypoints)
.keys()
Object.keys(waypoints)
.sort((keyA, keyB) => TransactionUtils.getWaypointIndex(keyA) - TransactionUtils.getWaypointIndex(keyB))
.map((key) => ({[key]: waypoints[key]}))
.reduce((result, obj) => (obj ? Object.assign(result, obj) : result), {})
.value(),
.reduce((result, obj) => (obj ? Object.assign(result, obj) : result), {}),
[waypoints],
);
return (
Expand Down

0 comments on commit 689c227

Please sign in to comment.