Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerGery committed Jan 15, 2024
1 parent a382c34 commit 56aaae0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/client/Locomotion/src/context/newRideContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ const RidePageContextProvider = ({ children }: {
clearInterval(intervalRef.current);
};

const saveLastRide = async (rideId: string, rideBusinessAccountId: string) => {
await Promise.all([
StorageService.save({ lastRideId: rideId }),
StorageService.save({ lastBusinessAccountId: rideBusinessAccountId || PAYMENT_MODES.PERSONAL }),
]);
};
const saveLastRide = async (rideId: string, rideBusinessAccountId: string) => Promise.all([
StorageService.save({ lastRideId: rideId }),
StorageService.save({ lastBusinessAccountId: rideBusinessAccountId || PAYMENT_MODES.PERSONAL }),
StorageService.save({ orderedRide: true }),
]);


const clearLastRide = async () => {
await StorageService.delete('lastRideId');
Expand Down Expand Up @@ -408,7 +408,7 @@ const RidePageContextProvider = ({ children }: {
return businessAccountId;
}
const [notFirstRide, fallbackId] = await Promise.all([
StorageService.get('lastRideId'),
StorageService.get('orderedRide'),
StorageService.get('lastBusinessAccountId'),
]);
const defaultPaymentMethod = notFirstRide ? getClientDefaultMethod() : null;
Expand Down

0 comments on commit 56aaae0

Please sign in to comment.