Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
diboune committed Oct 23, 2024
2 parents 06a2f8f + fcb2691 commit fb129c9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {Cta} from "@/components/shared/button";
import Body from "@/components/shared/typography/body";
import {useElements, useStripe} from "@stripe/react-stripe-js";
import {track} from "@vercel/analytics";
import {isRedirectError} from "next/dist/client/components/redirect";
import {useState, useTransition} from "react";

export default function StripePaymentButton({
Expand All @@ -23,6 +24,10 @@ export default function StripePaymentButton({
await placeOrder();
track("checkout-completed");
} catch (err: any) {
if (isRedirectError(err)) {
throw err;
}

setErrorMessage(err.message);
}
});
Expand Down

0 comments on commit fb129c9

Please sign in to comment.