Merged in fix/SW-1415-my-stay-tracking-hotelId (pull request #1880)
fix(SW-1415): add hotelId in tracking for my stay * fix(SW-1415): add hotelId in tracking for my stay * fix: remove toast if cancel guarantee * fix(SW-1415): rebase master * fix(SW-1415): fix comment shorthand hotelId Approved-by: Christian Andolf
This commit is contained in:
@@ -17,11 +17,6 @@ export function useGuaranteePaymentFailedToast() {
|
||||
const getErrorMessage = useCallback(
|
||||
(errorCode: string | null) => {
|
||||
switch (errorCode) {
|
||||
case BookingErrorCodeEnum.TransactionCancelled:
|
||||
return intl.formatMessage({
|
||||
defaultMessage:
|
||||
"You have cancelled to process to guarantee your booking.",
|
||||
})
|
||||
case "AncillaryFailed":
|
||||
return intl.formatMessage({
|
||||
defaultMessage:
|
||||
@@ -40,7 +35,8 @@ export function useGuaranteePaymentFailedToast() {
|
||||
useEffect(() => {
|
||||
const errorCode = searchParams.get("errorCode")
|
||||
const errorMessage = getErrorMessage(errorCode)
|
||||
if (!errorCode) return
|
||||
if (!errorCode || errorCode === BookingErrorCodeEnum.TransactionCancelled)
|
||||
return
|
||||
|
||||
// setTimeout is needed to show toasts on page load: https://sonner.emilkowal.ski/toast#render-toast-on-page-load
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user