Skip to content

Commit

Permalink
Merge pull request #350 from w3bdesign/develop
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
w3bdesign authored Feb 14, 2021
2 parents 6882940 + 2916aaf commit 212df9e
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions components/Checkout/CheckoutForm.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import LoadingSpinner from '../LoadingSpinner/LoadingSpinner.component';

import { GET_CART } from 'utils/gql/GQL_QUERIES';
import { CHECKOUT_MUTATION } from 'utils/gql/GQL_MUTATIONS';

import { AppContext } from 'utils/context/AppContext';

import {
Expand All @@ -24,23 +23,23 @@ const CheckoutForm = () => {
const [orderCompleted, setorderCompleted] = useState(false);

// Checkout GraphQL mutation
const [
checkout,
{ data: checkoutResponse, loading: checkoutLoading, error: checkoutError },
] = useMutation(CHECKOUT_MUTATION, {
variables: {
input: orderData,
},
onCompleted: () => {
setorderCompleted(true);
refetch();
},
onError: (error) => {
if (error) {
setRequestError(error);
}
},
});
const [checkout, { loading: checkoutLoading }] = useMutation(
CHECKOUT_MUTATION,
{
variables: {
input: orderData,
},
onCompleted: () => {
setorderCompleted(true);
refetch();
},
onError: (error) => {
if (error) {
setRequestError(error);
}
},
}
);

// Get Cart Data.
const { loading, error, data, refetch } = useQuery(GET_CART, {
Expand Down

1 comment on commit 212df9e

@vercel
Copy link

@vercel vercel bot commented on 212df9e Feb 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.