Skip to content

Commit c972e3a

Browse files
authored
Merge pull request #351 from w3bdesign/develop
Fix SonarCloud code quality issues
2 parents 212df9e + 2bf6d3d commit c972e3a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

components/Checkout/CheckoutForm.component.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ const CheckoutForm = () => {
3434
refetch();
3535
},
3636
onError: (error) => {
37-
if (error) {
38-
setRequestError(error);
39-
}
37+
setRequestError(error);
4038
},
4139
}
4240
);
4341

4442
// Get Cart Data.
45-
const { loading, error, data, refetch } = useQuery(GET_CART, {
43+
const { data, refetch } = useQuery(GET_CART, {
4644
notifyOnNetworkStatusChange: true,
4745
onCompleted: () => {
4846
// Update cart in the localStorage.
@@ -60,8 +58,8 @@ const CheckoutForm = () => {
6058
}
6159
}, [orderData]);
6260

63-
const onSubmit = (data) => {
64-
const checkOutData = createCheckoutData(data);
61+
const onSubmit = (submitData) => {
62+
const checkOutData = createCheckoutData(submitData);
6563
setOrderData(checkOutData);
6664
setRequestError(null);
6765
};

0 commit comments

Comments
 (0)