Skip to content

Commit

Permalink
fix(payment): redirect after incorrect couponcode entry
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut authored and ChristiaanScheermeijer committed Feb 7, 2024
1 parent 3deabfc commit ca71f29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Checkout = () => {
},
onSubmitSuccess: ({ couponCode }): void => setShowCouponCodeSuccess(!!couponCode),
onSubmitError: ({ error }) => {
if (error instanceof FormValidationError && error.errors.order?.includes(`not found`)) {
if (error instanceof FormValidationError && error.errors.order?.includes(`Order with id ${order?.id} not found`)) {
navigate(modalURLFromLocation(location, 'choose-offer'), { replace: true });
}
},
Expand Down

0 comments on commit ca71f29

Please sign in to comment.