fix/error-while-confirm-booking (#4834)

* Add try/catch on workflows while confirming a booking

* Revert "added ?tabName=setup to event-type detail link to give it active status (#4830)"

This reverts commit 11c44db609.

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
alannncandOmar López authored and GitHub committed 2022-10-04 14:46:17 -05:00
1 parent 8e369d3fb5
commit f01058e073
4 files changed
+44 -26

No files matched your search

@@ -44,6 +44,11 @@ function BookingListItem(booking: BookingItemProps) {
const mutation = trpc.useMutation(["viewer.bookings.confirm"], {
onSuccess: () => {
setRejectionDialogIsOpen(false);
showToast(t("booking_confirmation_success"), "success");
utils.invalidateQueries("viewer.bookings");
},
onError: () => {
showToast(t("booking_confirmation_failed"), "error");
utils.invalidateQueries("viewer.bookings");
},
});