From 9c9aad7de7152ac9ad136f7611a95141beafbc50 Mon Sep 17 00:00:00 2001 From: Nenad Date: Mon, 11 Dec 2023 12:39:09 +0100 Subject: [PATCH] Handle error --- src/components/donation/Steps/DonateMethods/PayPal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/donation/Steps/DonateMethods/PayPal.tsx b/src/components/donation/Steps/DonateMethods/PayPal.tsx index 39e2ea9e61..59d7846ccc 100644 --- a/src/components/donation/Steps/DonateMethods/PayPal.tsx +++ b/src/components/donation/Steps/DonateMethods/PayPal.tsx @@ -4,6 +4,7 @@ import { ReactPayPalScriptOptions, usePayPalScriptReducer, } from "@paypal/react-paypal-js"; +import { useErrorContext } from "contexts/ErrorContext"; import LoaderRing from "components/LoaderRing"; import { PAYPAL_CLIENT_ID } from "constants/env"; @@ -24,10 +25,12 @@ export default function PayPal() { function ButtonWrapper() { const [{ isPending }] = usePayPalScriptReducer(); + const { handleError } = useErrorContext(); + return (
{isPending && } - +
); }