Skip to content

Commit

Permalink
chore: replace deprecated deleteReservation
Browse files Browse the repository at this point in the history
  • Loading branch information
joonatank committed Jan 13, 2025
1 parent 7f87785 commit 3a062aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function InProgressReservationNotification() {
deleteReservation,
{ data: deleteData, error: deleteError, loading: isDeleteLoading },
] = useDeleteReservationMutation();
const deleted = deleteData?.deleteReservation?.deleted;
const deleted = deleteData?.deleteTentativeReservation?.deleted;

const order = unpaidReservation?.paymentOrder[0];
const checkoutUrl = getCheckoutUrl(order, i18n.language);
Expand Down
8 changes: 4 additions & 4 deletions apps/ui/gql/gql-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6244,11 +6244,11 @@ export type UpdateReservationMutation = {
};

export type DeleteReservationMutationVariables = Exact<{
input: ReservationDeleteMutationInput;
input: ReservationDeleteTentativeMutationInput;
}>;

export type DeleteReservationMutation = {
deleteReservation?: { deleted?: boolean | null } | null;
deleteTentativeReservation?: { deleted?: boolean | null } | null;
};

export type CancelReservationMutationVariables = Exact<{
Expand Down Expand Up @@ -10228,8 +10228,8 @@ export type UpdateReservationMutationOptions = Apollo.BaseMutationOptions<
UpdateReservationMutationVariables
>;
export const DeleteReservationDocument = gql`
mutation DeleteReservation($input: ReservationDeleteMutationInput!) {
deleteReservation(input: $input) {
mutation DeleteReservation($input: ReservationDeleteTentativeMutationInput!) {
deleteTentativeReservation(input: $input) {
deleted
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/modules/queries/reservation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const UPDATE_RESERVATION = gql`
`;

export const DELETE_RESERVATION = gql`
mutation DeleteReservation($input: ReservationDeleteMutationInput!) {
deleteReservation(input: $input) {
mutation DeleteReservation($input: ReservationDeleteTentativeMutationInput!) {
deleteTentativeReservation(input: $input) {
deleted
}
}
Expand Down

0 comments on commit 3a062aa

Please sign in to comment.