Handle redirect on purchase

pull/8145/head
Kamran Ahmed 2 weeks ago
parent 126501b40a
commit 201632941a
  1. 6
      src/components/SQLCourse/BuyButton.tsx

@ -75,6 +75,12 @@ export function BuyButton(props: BuyButtonProps) {
window.location.href = data.checkoutUrl;
},
});
// Hacky way to make sure that we redirect in case
// GA was blocked or not able to redirect the user.
setTimeout(() => {
window.location.href = data.checkoutUrl;
}, 3000);
},
onError: (error) => {
console.error(error);

Loading…
Cancel
Save