Skip to content

Commit

Permalink
Remove deprecated function
Browse files Browse the repository at this point in the history
By using Promises.all() we can control the overall request status
  • Loading branch information
spaceo committed Nov 28, 2023
1 parent 2e8005b commit 939e1b6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/apps/reservation-list/modal/delete-reservation/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ export const getReservationsToDelete = (reservations: ReservationType[]) => {
return { physical, digital };
};

export const getDeleteReservationStatus = ({
physical,
digital
}: {
physical: RequestStatus;
digital: RequestStatus;
}) => {
if (physical === "pending" || digital === "pending") {
return "pending";
}

if (physical === "error" || digital === "error") {
return "error";
}

if (physical === "success" || digital === "success") {
return "success";
}

return "idle";
};

export const getDeleteButtonLabel = ({
reservationsCount,
deletionStatus,
Expand Down

0 comments on commit 939e1b6

Please sign in to comment.