Skip to content

Commit 6de181d

Browse files
committed
Remove unused packages and functions
1 parent 7f0bb5b commit 6de181d

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

components/Cart/AddToCartButton.component.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useState, useContext } from 'react';
2-
import { request } from 'graphql-request';
32

43
import { v4 as uuidv4 } from 'uuid';
54

@@ -18,9 +17,6 @@ import {
1817
removeItemFromCart,
1918
} from 'utils/functions/functions';
2019

21-
import { addFirstProduct } from 'utils/functions/functions';
22-
import { updateCart } from 'utils/functions/functions';
23-
2420
/**
2521
* Display and process product object when we click on the Add To Cart button
2622
* Adds product to shopping cart
@@ -44,9 +40,7 @@ const AddToCartButton = (props) => {
4440
onCompleted: () => {
4541
// Update cart in the localStorage.
4642
const updatedCart = getFormattedCart(data);
47-
4843
localStorage.setItem('woocommerce-cart', JSON.stringify(updatedCart));
49-
5044
// Update cart data in React Context.
5145
setCart(updatedCart);
5246
},

package-lock.json

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-woocommerce",
3-
"version": "0.2.3",
3+
"version": "0.2.5",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
@@ -21,7 +21,6 @@
2121
"apollo-link-error": "^1.1.13",
2222
"apollo-link-http": "^1.5.17",
2323
"graphql": "^15.2.0",
24-
"graphql-request": "^2.0.0",
2524
"graphql-tag": "^2.10.3",
2625
"next": "^9.4.4",
2726
"nprogress": "^0.2.0",

0 commit comments

Comments
 (0)