diff --git a/components/Checkout/CheckoutForm.component.jsx b/components/Checkout/CheckoutForm.component.jsx index e2d0713b8..487144ccf 100644 --- a/components/Checkout/CheckoutForm.component.jsx +++ b/components/Checkout/CheckoutForm.component.jsx @@ -34,15 +34,13 @@ const CheckoutForm = () => { refetch(); }, onError: (error) => { - if (error) { - setRequestError(error); - } + setRequestError(error); }, } ); // Get Cart Data. - const { loading, error, data, refetch } = useQuery(GET_CART, { + const { data, refetch } = useQuery(GET_CART, { notifyOnNetworkStatusChange: true, onCompleted: () => { // Update cart in the localStorage. @@ -60,8 +58,8 @@ const CheckoutForm = () => { } }, [orderData]); - const onSubmit = (data) => { - const checkOutData = createCheckoutData(data); + const onSubmit = (submitData) => { + const checkOutData = createCheckoutData(submitData); setOrderData(checkOutData); setRequestError(null); };