Fixed loading blocking the paypal box

This commit is contained in:
Joao Ramos
2024-03-06 11:38:08 +00:00
parent c95c0eff9b
commit 8e1fe15a24

View File

@@ -55,7 +55,14 @@ export default function PayPalPayment({
trackingId, trackingId,
}) })
.then((response) => response.data) .then((response) => response.data)
.then((data) => data.id); .then((data) => {
setIsLoading(false);
return data.id;
})
.catch((err) => {
setIsLoading(false);
return err;
});
}; };
const onApprove = async (data: OnApproveData, actions: OnApproveActions) => { const onApprove = async (data: OnApproveData, actions: OnApproveActions) => {