diff --git a/components/Cart/AddToCartButton.component.jsx b/components/Cart/AddToCartButton.component.jsx
index 44ee3a7e5..da0fabea2 100644
--- a/components/Cart/AddToCartButton.component.jsx
+++ b/components/Cart/AddToCartButton.component.jsx
@@ -2,7 +2,7 @@ import { useState, useContext } from 'react';
import { v4 as uuidv4 } from 'uuid';
-import { useQuery, useMutation } from '@apollo/react-hooks';
+import { useQuery, useMutation } from '@apollo/client';
import { AppContext } from 'utils/context/AppContext';
import LoadingSpinner from 'components/LoadingSpinner/LoadingSpinner.component';
diff --git a/components/Cart/CartPage/CartItemsContainer.component.jsx b/components/Cart/CartPage/CartItemsContainer.component.jsx
index 37469524d..978c0ed83 100644
--- a/components/Cart/CartPage/CartItemsContainer.component.jsx
+++ b/components/Cart/CartPage/CartItemsContainer.component.jsx
@@ -1,7 +1,7 @@
import Link from 'next/link';
import { v4 } from 'uuid';
import { useContext, useState } from 'react';
-import { useQuery, useMutation } from '@apollo/react-hooks';
+import { useQuery, useMutation } from '@apollo/client';
import { AppContext } from 'utils/context/AppContext';
import {
diff --git a/components/Checkout/CheckoutForm.component.jsx b/components/Checkout/CheckoutForm.component.jsx
index de3aacd5e..04ae42ab9 100644
--- a/components/Checkout/CheckoutForm.component.jsx
+++ b/components/Checkout/CheckoutForm.component.jsx
@@ -1,5 +1,5 @@
import { useState, useContext, useEffect } from 'react';
-import { useQuery, useMutation } from '@apollo/react-hooks';
+import { useQuery, useMutation } from '@apollo/client';
import Billing from './Billing.component';
import OrderDetails from './OrderDetails.component';
diff --git a/components/Product/IndexProducts.component.jsx b/components/Product/IndexProducts.component.jsx
index 49f9d2852..6f61efff0 100644
--- a/components/Product/IndexProducts.component.jsx
+++ b/components/Product/IndexProducts.component.jsx
@@ -32,12 +32,14 @@ const IndexProducts = ({ products }) => {
as={`/produkt/${slug}?productId=${productId}`}
>
-
+ {image && (
+
+ )}
diff --git a/package-lock.json b/package-lock.json
index e57e96924..f053dd077 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,122 +1,122 @@
{
"name": "nextjs-woocommerce",
- "version": "0.9.83",
+ "version": "0.9.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@algolia/cache-browser-local-storage": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.3.0.tgz",
- "integrity": "sha512-91Cf3IPUk84PF2wvR8ys8XO42FqaJEtIh/dyR0WvwMdv0x13GORkAvoBJgkFI2wofZqUY86jNimvHWfsWzPQ+g==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.3.1.tgz",
+ "integrity": "sha512-pNelJomUeeQS5ZagEeUti8HltrfJbqXHnZXB1fez4Ycdm7GsEQm0r6fRCfx+1/6hqQJNo5zQUSA4ZgWi8VMs4Q==",
"requires": {
- "@algolia/cache-common": "4.3.0"
+ "@algolia/cache-common": "4.3.1"
}
},
"@algolia/cache-common": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.3.0.tgz",
- "integrity": "sha512-AHTbOn9lk0f5IkjssXXmDgnaZfsUJVZ61sqOH1W3LyJdAscDzCj0KtwijELn8FHlLXQak7+K93/O3Oct0uHncQ=="
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.3.1.tgz",
+ "integrity": "sha512-BgZVQKfQ3rYSKHDbEuYeIHgQ7cIqbDVUe8gPib/YI6hB2FWdt3hQyDqKslulBt65MxZ5CLSrWg8mq/qL077Bog=="
},
"@algolia/cache-in-memory": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.3.0.tgz",
- "integrity": "sha512-8BZS5IFEtiSFkA6vNQUXJXIWABDbSanQdkGX5LArlhbCjuykZqF68yaCjXWG10EZTySnkZLmKc+5ozYVOktJaQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.3.1.tgz",
+ "integrity": "sha512-bd2Aqn8efGJpR8snjUvBJIONyQ2uqYQSbFH9rTrLPmJPMYdoTKTcVLrtpOhOlmvTTfguhqlv+zIjYdJcraeBvg==",
"requires": {
- "@algolia/cache-common": "4.3.0"
+ "@algolia/cache-common": "4.3.1"
}
},
"@algolia/client-account": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.3.0.tgz",
- "integrity": "sha512-8LJSvWooc+fe+XZXeu+h4dhpo9lsu3sb7rV9cpPhymYSHgEJAHaDkZEcPM1u/PBMvFe0mZXaW6nabeb3jeIRcw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.3.1.tgz",
+ "integrity": "sha512-062Cxw61llvkeHS2bWghufNI0munw5fKGZBhUfDdnC7lsJpzYJwQdkdchzLqqIOXZa8k9vdLlnlKHk8f53E5fQ==",
"requires": {
- "@algolia/client-common": "4.3.0",
- "@algolia/client-search": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "@algolia/client-common": "4.3.1",
+ "@algolia/client-search": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"@algolia/client-analytics": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.3.0.tgz",
- "integrity": "sha512-BFH4ddyrqI2pE3bUctn5KtJgYqgvO0Ap9vJEHBNj6mjSKqFbTnZeVEPG3yWrOuWRCqPHR3ewcWRisNwJHG3+Mw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.3.1.tgz",
+ "integrity": "sha512-+/gn1z3oAh2CE0xox7/Df9SseHcOuqgm4ngSXGh1cWpldsF+gioA9HWSh/4RSydViASKu3YIk5O61zFzVTKbOA==",
"requires": {
- "@algolia/client-common": "4.3.0",
- "@algolia/client-search": "4.3.0",
- "@algolia/requester-common": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "@algolia/client-common": "4.3.1",
+ "@algolia/client-search": "4.3.1",
+ "@algolia/requester-common": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"@algolia/client-common": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.3.0.tgz",
- "integrity": "sha512-8Ohj6zXZkpwDKc8ZWVTZo2wPO4+LT5D258suGg/C6nh4UxOrFOp6QaqeQo8JZ1eqMqtfb3zv5SHgW4fZ00NCLQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.3.1.tgz",
+ "integrity": "sha512-1dcADKy3F/gMN+s+p5yvYdF6A4L5YEY0ll4JjSHGKXvZyWLDxKjyu/ToeUuHlrutWQu9w8UT2X7urES8BZU5WQ==",
"requires": {
- "@algolia/requester-common": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "@algolia/requester-common": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"@algolia/client-recommendation": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/client-recommendation/-/client-recommendation-4.3.0.tgz",
- "integrity": "sha512-jCMIAWPA2hsxc5CCtoTtQAcohaG+10CxXK122Tc47t4w1K8qzSJnCjC2cHvM4UNJO+k7NrmjOYW0EXp9RKc7SQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/client-recommendation/-/client-recommendation-4.3.1.tgz",
+ "integrity": "sha512-4WZ9Pa2waOkpqv5acom4f8XBBlrnafeEwcSK4R0msubHJpUdkvD/+rxT5Ya1/0FAGvBPhOvtOJqsauaJYKM2Dw==",
"requires": {
- "@algolia/client-common": "4.3.0",
- "@algolia/requester-common": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "@algolia/client-common": "4.3.1",
+ "@algolia/requester-common": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"@algolia/client-search": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.3.0.tgz",
- "integrity": "sha512-KCgcIsNMW1/0F5OILiFTddbTAKduJHRvXQS4NxY1H9gQWMTVeWJS7VZQ/ukKBiUMLatwUQHJz2qpYm9fmqOjkQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.3.1.tgz",
+ "integrity": "sha512-BGI8+8Gi3OELHtyXHflGz0Ms0DQLUQFu2Hs4us3L9gidyYhuvjl76x8EOOQRkXhQcWzEeqx+L2c2InTKtNfQfg==",
"requires": {
- "@algolia/client-common": "4.3.0",
- "@algolia/requester-common": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "@algolia/client-common": "4.3.1",
+ "@algolia/requester-common": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"@algolia/logger-common": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.3.0.tgz",
- "integrity": "sha512-vQ+aukjZkRAyO9iyINBefT366UtF/B9QoA1Kw8PlY67T6fYmklFgYp3LNH/e7h/gz0py5LYY/HIwSsaTKk8/VQ=="
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.3.1.tgz",
+ "integrity": "sha512-HOY89EkxFFR0LjeqE+fqaF3EeQUAYFdVdrAXsnrWhm/OsAlXiy+vsoHL4EaJLXvTQlJRBbgNyyQv8ZPAN9JLCw=="
},
"@algolia/logger-console": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.3.0.tgz",
- "integrity": "sha512-7pWtcv1cSSa7F48gRBOZLcEWN073+WbnKjbpRrIGej+abZppw/h+22jtVZZORC8EIjFffGqz2/2e6bZiX+Jg7A==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.3.1.tgz",
+ "integrity": "sha512-aIJ2N++eTVLkwGFxb1AY60hxYIrNf3FgaEMkokPOAV7sPoWThITSQPj/2vruRLJsYZS2EnD8jxiETrCwSet7mw==",
"requires": {
- "@algolia/logger-common": "4.3.0"
+ "@algolia/logger-common": "4.3.1"
}
},
"@algolia/requester-browser-xhr": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.3.0.tgz",
- "integrity": "sha512-CpUwgQhXZsnZmjEd5DTwQv1BKQNCt83bzyVdUqvljsFxZOsNQacS6lOYs0B1eD18tKHCwVMuwbYqTaLPGBXTKQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.3.1.tgz",
+ "integrity": "sha512-aSkBWqt9IjZYzmJpP14ISO9tizjyumwAmGxnx2t/QuE3LUh/sJG2FL3Vvq44wjNk9yTPC/c1yiQA85IqeqGZ7g==",
"requires": {
- "@algolia/requester-common": "4.3.0"
+ "@algolia/requester-common": "4.3.1"
}
},
"@algolia/requester-common": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.3.0.tgz",
- "integrity": "sha512-1v73KyspJBiTzfyXupjHxikxTYjh5MoxI6mOIvAtQxRqc4ehUPAEdPCNHEvvLiCK96iKWzZaULmV0U7pj3yvTw=="
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.3.1.tgz",
+ "integrity": "sha512-2lu0gOB2Rt4mn9gKDxjB8rY2IvU4usDA8bZVGl5tf/E81kRovtDZcgZjuKQ5zMyJ/xuIYXjx+ECXAxjUnNhieA=="
},
"@algolia/requester-node-http": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.3.0.tgz",
- "integrity": "sha512-Hg9Y8sUeSGQgoO1FpoL5jbkDzCtXI/8HXHybU6bimsX93DAz3HZWaoQFKmIpQDNhQ8G9FLgAtzDAxS6eckDxzg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.3.1.tgz",
+ "integrity": "sha512-CnVQ5fHJVsvOZjOIagAIWW315NwGF/spBT5o8/+9ZFTuKQTeLk8/jdj7OXKZ2+vbWkqDM1sKMFXH2jyHOlZjtQ==",
"requires": {
- "@algolia/requester-common": "4.3.0"
+ "@algolia/requester-common": "4.3.1"
}
},
"@algolia/transporter": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.3.0.tgz",
- "integrity": "sha512-BTKHAtdQdfOJ0xzZkiyEK/2QVQJTiVgBZlOBfXp2gBtztjV26OqfW4n6Xz0o7eBRzLEwY1ot3mHF5QIVUjAsMg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.3.1.tgz",
+ "integrity": "sha512-fbA/XHjdVoO+sp+rPVe/+oK/mCac0S6VugMycg7Etujb4+6nv3STIZxtPiC+Xppbouh5tEEOE81F1aALHXBkBQ==",
"requires": {
- "@algolia/cache-common": "4.3.0",
- "@algolia/logger-common": "4.3.0",
- "@algolia/requester-common": "4.3.0"
+ "@algolia/cache-common": "4.3.1",
+ "@algolia/logger-common": "4.3.1",
+ "@algolia/requester-common": "4.3.1"
}
},
"@ampproject/toolbox-core": {
@@ -168,24 +168,23 @@
"cross-fetch": "3.0.4"
}
},
- "@apollo/react-common": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@apollo/react-common/-/react-common-3.1.4.tgz",
- "integrity": "sha512-X5Kyro73bthWSCBJUC5XYQqMnG0dLWuDZmVkzog9dynovhfiVCV4kPSdgSIkqnb++cwCzOVuQ4rDKVwo2XRzQA==",
- "requires": {
- "ts-invariant": "^0.4.4",
- "tslib": "^1.10.0"
- }
- },
- "@apollo/react-hooks": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/@apollo/react-hooks/-/react-hooks-3.1.5.tgz",
- "integrity": "sha512-y0CJ393DLxIIkksRup4nt+vSjxalbZBXnnXxYbviq/woj+zKa431zy0yT4LqyRKpFy9ahMIwxBnBwfwIoupqLQ==",
+ "@apollo/client": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.0.2.tgz",
+ "integrity": "sha512-4ighan5Anlj4tK/tdUHs4Mi1njqXZ7AxRCVolz/H702DjPphAJfm+FRkIadPTmwz+OLO+d+tX+6V1VBshf02rg==",
"requires": {
- "@apollo/react-common": "^3.1.4",
+ "@types/zen-observable": "^0.8.0",
+ "@wry/context": "^0.5.2",
"@wry/equality": "^0.1.9",
+ "fast-json-stable-stringify": "^2.0.0",
+ "graphql-tag": "^2.10.4",
+ "hoist-non-react-statics": "^3.3.2",
+ "optimism": "^0.12.1",
+ "prop-types": "^15.7.2",
+ "symbol-observable": "^1.2.0",
"ts-invariant": "^0.4.4",
- "tslib": "^1.10.0"
+ "tslib": "^1.10.0",
+ "zen-observable": "^0.8.14"
}
},
"@babel/code-frame": {
@@ -2392,19 +2391,19 @@
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"@fullhuman/postcss-purgecss": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.2.0.tgz",
- "integrity": "sha512-q4zYAn8L9olA5uneaLhxkHRBoug9dnAqytbdX9R5dbzSORobhYr1yGR2JN3Q1UMd5RB0apm1NvJekHaymal/BQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.3.0.tgz",
+ "integrity": "sha512-qnKm5dIOyPGJ70kPZ5jiz0I9foVOic0j+cOzNDoo8KoCf6HjicIZ99UfO2OmE7vCYSKAAepEwJtNzpiiZAh9xw==",
"dev": true,
"requires": {
- "postcss": "7.0.28",
- "purgecss": "^2.2.0"
+ "postcss": "7.0.32",
+ "purgecss": "^2.3.0"
},
"dependencies": {
"postcss": {
- "version": "7.0.28",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.28.tgz",
- "integrity": "sha512-YU6nVhyWIsVtlNlnAj1fHTsUKW5qxm3KEgzq2Jj6KTEFOTK8QWR12eIDvrlWhiSTK8WIBFTBhOJV4DY6dUuEbw==",
+ "version": "7.0.32",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
+ "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
@@ -2511,9 +2510,9 @@
"integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="
},
"@types/react": {
- "version": "16.9.42",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.42.tgz",
- "integrity": "sha512-iGy6HwfVfotqJ+PfRZ4eqPHPP5NdPZgQlr0lTs8EfkODRBV9cYy8QMKcC9qPCe1JrESC1Im6SrCFR6tQgg74ag==",
+ "version": "16.9.43",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.43.tgz",
+ "integrity": "sha512-PxshAFcnJqIWYpJbLPriClH53Z2WlJcVZE+NP2etUtWQs2s7yIMj3/LDKZT/5CHJ/F62iyjVCDu2H3jHEXIxSg==",
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
@@ -2681,6 +2680,14 @@
"@xtuc/long": "4.2.2"
}
},
+ "@wry/context": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.5.2.tgz",
+ "integrity": "sha512-B/JLuRZ/vbEKHRUiGj6xiMojST1kHhu4WcreLfNN7q9DqQFrb97cWgf/kiYsPSUCAMVN0HzfFc8XjJdzgZzfjw==",
+ "requires": {
+ "tslib": "^1.9.3"
+ }
+ },
"@wry/equality": {
"version": "0.1.11",
"resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz",
@@ -2716,17 +2723,17 @@
},
"dependencies": {
"acorn": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
- "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
+ "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
"dev": true
}
}
},
"acorn-walk": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz",
- "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
+ "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
"dev": true
},
"adjust-sourcemap-loader": {
@@ -2802,30 +2809,30 @@
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ=="
},
"algoliasearch": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.3.0.tgz",
- "integrity": "sha512-H2woXyqmd1nFYDrQKLZXgghNkLBTcBXJ7Q/bxQ+F9WWS4H0Kb7IlQvNi7bDzHyldhDhIthImaUwcKqr5iiyMFQ==",
- "requires": {
- "@algolia/cache-browser-local-storage": "4.3.0",
- "@algolia/cache-common": "4.3.0",
- "@algolia/cache-in-memory": "4.3.0",
- "@algolia/client-account": "4.3.0",
- "@algolia/client-analytics": "4.3.0",
- "@algolia/client-common": "4.3.0",
- "@algolia/client-recommendation": "4.3.0",
- "@algolia/client-search": "4.3.0",
- "@algolia/logger-common": "4.3.0",
- "@algolia/logger-console": "4.3.0",
- "@algolia/requester-browser-xhr": "4.3.0",
- "@algolia/requester-common": "4.3.0",
- "@algolia/requester-node-http": "4.3.0",
- "@algolia/transporter": "4.3.0"
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.3.1.tgz",
+ "integrity": "sha512-q8aIYgdZZWOMzmvlIwxcbktVa8+M5cyI8hIrgd/NcSz/XKHfVTKdNYbnsmPqmYrssAmepx8C8vHnJrPuumUnYA==",
+ "requires": {
+ "@algolia/cache-browser-local-storage": "4.3.1",
+ "@algolia/cache-common": "4.3.1",
+ "@algolia/cache-in-memory": "4.3.1",
+ "@algolia/client-account": "4.3.1",
+ "@algolia/client-analytics": "4.3.1",
+ "@algolia/client-common": "4.3.1",
+ "@algolia/client-recommendation": "4.3.1",
+ "@algolia/client-search": "4.3.1",
+ "@algolia/logger-common": "4.3.1",
+ "@algolia/logger-console": "4.3.1",
+ "@algolia/requester-browser-xhr": "4.3.1",
+ "@algolia/requester-common": "4.3.1",
+ "@algolia/requester-node-http": "4.3.1",
+ "@algolia/transporter": "4.3.1"
}
},
"algoliasearch-helper": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.1.2.tgz",
- "integrity": "sha512-HfCVvmKH6+5OU9/SaHLdhvr39DBObA02z62RsfPhFDftzgQM6pJB2JoPyGpIteHW4RAYh8bPLiB8l4hajuy6fA==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.2.1.tgz",
+ "integrity": "sha512-qf/1HVsx24JQUxMz5djeBPDc4Zmnf23VrC2FT8PrZEclcBmZqD9ZGv7mhOVUr8pTo1hWU6knl7KM+WnorzIxag==",
"requires": {
"events": "^1.1.1"
},
@@ -4052,9 +4059,9 @@
}
},
"css-unit-converter": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz",
- "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz",
+ "integrity": "sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==",
"dev": true
},
"css-what": {
@@ -6210,6 +6217,14 @@
"wrappy": "1"
}
},
+ "optimism": {
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.12.1.tgz",
+ "integrity": "sha512-t8I7HM1dw0SECitBYAqFOVHoBAHEQBTeKjIL9y9ImHzAVkdyPK4ifTgM4VJRDtTUY4r/u5Eqxs4XcGPHaoPkeQ==",
+ "requires": {
+ "@wry/context": "^0.5.2"
+ }
+ },
"os-browserify": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
@@ -6951,13 +6966,26 @@
}
},
"postcss-nested": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-4.2.1.tgz",
- "integrity": "sha512-AMayXX8tS0HCp4O4lolp4ygj9wBn32DJWXvG6gCv+ZvJrEa00GUxJcJEEzMh87BIe6FrWdYkpR2cuyqHKrxmXw==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-4.2.3.tgz",
+ "integrity": "sha512-rOv0W1HquRCamWy2kFl3QazJMMe1ku6rCFoAAH+9AcxdbpDeBr6k968MLWuLjvjMcGEip01ak09hKOEgpK9hvw==",
"dev": true,
"requires": {
- "postcss": "^7.0.21",
+ "postcss": "^7.0.32",
"postcss-selector-parser": "^6.0.2"
+ },
+ "dependencies": {
+ "postcss": {
+ "version": "7.0.32",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
+ "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.2",
+ "source-map": "^0.6.1",
+ "supports-color": "^6.1.0"
+ }
+ }
}
},
"postcss-nesting": {
@@ -7466,14 +7494,14 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"purgecss": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.2.1.tgz",
- "integrity": "sha512-wngRSLW1dpNr8kr3TL9nTJMyTFI5BiRiaUUEys5M1CA4zEHLF25fRHoshEeDqmhstaNTOddmpYM34zRrUtEGbQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.3.0.tgz",
+ "integrity": "sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ==",
"dev": true,
"requires": {
"commander": "^5.0.0",
"glob": "^7.0.0",
- "postcss": "7.0.28",
+ "postcss": "7.0.32",
"postcss-selector-parser": "^6.0.2"
},
"dependencies": {
@@ -7484,9 +7512,9 @@
"dev": true
},
"postcss": {
- "version": "7.0.28",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.28.tgz",
- "integrity": "sha512-YU6nVhyWIsVtlNlnAj1fHTsUKW5qxm3KEgzq2Jj6KTEFOTK8QWR12eIDvrlWhiSTK8WIBFTBhOJV4DY6dUuEbw==",
+ "version": "7.0.32",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
+ "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
@@ -7564,14 +7592,14 @@
"integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA=="
},
"react-hook-form": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.0.3.tgz",
- "integrity": "sha512-LU+SlFdt4KT1FdvrhPW1J9JKHg8+AvkAxlcGjdIPyVHRQj2/GU+HmCVraKzPGks6POty05NtoH/Uga0dLemzrw=="
+ "version": "6.0.8",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.0.8.tgz",
+ "integrity": "sha512-lf1TTuRuqHkYJqDtNIgDu9Rk7euKWkFaG2+XZ3FSkngiFWR72Lj96/FeSGF+ZMylCLdCFq2F059kzucVKWvDiQ=="
},
"react-instantsearch-core": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/react-instantsearch-core/-/react-instantsearch-core-6.6.0.tgz",
- "integrity": "sha512-Rf3Qh7lMGtc5ZIo9A4QoDAW4Pso8JP67r07KdHEmzhEDRGhW7Ga0Ri4rXN6ahcjmwLoo5Fz14LpX4gn3Yrz9kg==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/react-instantsearch-core/-/react-instantsearch-core-6.7.0.tgz",
+ "integrity": "sha512-wIvSIwkWfqPbaQZcbKsfBK3Gpm1e7ahSwU8Bmx1N5RfUqA/NghqS0Ppv3sz4vCXjoEAdPV06R+Fpn9lT+cE9/Q==",
"requires": {
"@babel/runtime": "^7.1.2",
"algoliasearch-helper": "^3.1.0",
@@ -7580,15 +7608,15 @@
}
},
"react-instantsearch-dom": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/react-instantsearch-dom/-/react-instantsearch-dom-6.6.0.tgz",
- "integrity": "sha512-pC6SB7Ruvgc1Iv9ELbzgaEJUDeoX3zBuNqSu9S4qAAIZaYUB+C05Y/LW1/TPTeRSQyPFJ0FmrrpnyHn6qpMKIQ==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/react-instantsearch-dom/-/react-instantsearch-dom-6.7.0.tgz",
+ "integrity": "sha512-J1C9xkHHLLa6rkKLKFDa7szA0TDo6yPFGmDzh2+JLaq4o694RIqivfUpROHus0Ki3BAQu9QmzLtodf6K1NOBWQ==",
"requires": {
"@babel/runtime": "^7.1.2",
"algoliasearch-helper": "^3.1.0",
"classnames": "^2.2.5",
"prop-types": "^15.5.10",
- "react-instantsearch-core": "^6.6.0"
+ "react-instantsearch-core": "^6.7.0"
}
},
"react-is": {
@@ -8497,16 +8525,16 @@
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
},
"tailwindcss": {
- "version": "1.4.6",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.4.6.tgz",
- "integrity": "sha512-qV0qInUq1FWih39Bc5CWECdgObSzRrbjGD4ke4kAPSIq6WXrPhv0wwOcUWJgJ66ltT9j+XnSRYikG8WNRU/fTQ==",
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.5.2.tgz",
+ "integrity": "sha512-OR7wxFetvHruLkQABeQac7jFdTOs+MwXzsuccOuMItva9GBANPd2VX8NgJ3pdvuGSL23c5cVId9jsvuKgulBiQ==",
"dev": true,
"requires": {
"@fullhuman/postcss-purgecss": "^2.1.2",
"autoprefixer": "^9.4.5",
"browserslist": "^4.12.0",
"bytes": "^3.0.0",
- "chalk": "^4.0.0",
+ "chalk": "^3.0.0 || ^4.0.0",
"color": "^3.1.2",
"detective": "^5.2.0",
"fs-extra": "^8.0.0",
@@ -8534,9 +8562,9 @@
}
},
"chalk": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
- "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
diff --git a/package.json b/package.json
index 02490b168..767b465e3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "nextjs-woocommerce",
- "version": "0.9.83",
+ "version": "0.9.9",
"description": "",
"main": "index.js",
"scripts": {
@@ -12,23 +12,17 @@
"author": "",
"license": "ISC",
"dependencies": {
- "@apollo/react-hooks": "^3.1.5",
- "@types/react": "^16.9.42",
- "algoliasearch": "^4.3.0",
+ "@apollo/client": "^3.0.2",
+ "@types/react": "^16.9.43",
+ "algoliasearch": "^4.3.1",
"apollo-boost": "^0.4.9",
- "apollo-cache-inmemory": "^1.6.6",
- "apollo-client": "^2.6.10",
- "apollo-link": "^1.2.14",
- "apollo-link-error": "^1.1.13",
- "apollo-link-http": "^1.5.17",
"graphql": "^15.3.0",
- "graphql-tag": "^2.10.4",
"next": "^9.4.4",
"nprogress": "^0.2.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
- "react-hook-form": "^6.0.3",
- "react-instantsearch-dom": "^6.6.0",
+ "react-hook-form": "^6.0.8",
+ "react-instantsearch-dom": "^6.7.0",
"react-spring": "^8.0.27",
"styled-components": "^5.1.1",
"uuid": "^8.2.0"
@@ -36,6 +30,6 @@
"devDependencies": {
"babel-plugin-styled-components": "^1.10.7",
"postcss-preset-env": "^6.7.0",
- "tailwindcss": "^1.4.6"
+ "tailwindcss": "^1.5.2"
}
}
diff --git a/pages/_app.js b/pages/_app.js
index 172514fd1..4b6e81395 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -1,4 +1,4 @@
-import { ApolloProvider } from '@apollo/react-hooks';
+import { ApolloProvider } from '@apollo/client'
import { AppProvider } from 'utils/context/AppContext';
import Router from 'next/router';
diff --git a/utils/apollo/ApolloClient.js b/utils/apollo/ApolloClient.js
index b3590ab01..e2a12172a 100644
--- a/utils/apollo/ApolloClient.js
+++ b/utils/apollo/ApolloClient.js
@@ -1,18 +1,20 @@
import fetch from 'node-fetch';
-import { ApolloClient } from 'apollo-client';
-import { InMemoryCache } from 'apollo-cache-inmemory';
-import { createHttpLink } from 'apollo-link-http';
-import { ApolloLink } from 'apollo-link';
+import {
+ ApolloClient,
+ InMemoryCache,
+ createHttpLink,
+ ApolloLink,
+ //IntrospectionFragmentMatcher,
+} from '@apollo/client';
-import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import introspectionQueryResultData from './fragmentTypes';
import { WOO_CONFIG } from 'utils/config/nextConfig';
// Fragment matcher.
-const fragmentMatcher = new IntrospectionFragmentMatcher({
+/*const fragmentMatcher = new IntrospectionFragmentMatcher({
introspectionQueryResultData,
-});
+});*/
/**
* Middleware operation
@@ -88,7 +90,8 @@ const client = new ApolloClient({
})
)
),
- cache: new InMemoryCache({ fragmentMatcher }),
+ //cache: new InMemoryCache({ possibleTypes: introspectionQueryResultData }),
+ cache: new InMemoryCache(),
});
export default client;
diff --git a/utils/config/nextConfig.js b/utils/config/nextConfig.js
index 798cbe222..924e4f157 100644
--- a/utils/config/nextConfig.js
+++ b/utils/config/nextConfig.js
@@ -2,21 +2,22 @@
// Live details
+/*
export const WOO_CONFIG = {
GRAPHQL_URL: 'https://woocommerce.dfweb.no/graphql',
ALGOLIA_APP_ID: '7L9M5Y0B1K',
ALGOLIA_PUBLIC_API_KEY: '925cc92373120f1bf477bb8ce0e71649',
ALGOLIA_INDEX_NAME: 'dfweb',
};
+*/
// Development details
-/*
export const WOO_CONFIG = {
GRAPHQL_URL: 'http://localhost/wp/graphql',
ALGOLIA_APP_ID: '7L9M5Y0B1K',
ALGOLIA_PUBLIC_API_KEY: '925cc92373120f1bf477bb8ce0e71649',
};
-*/
+
export default WOO_CONFIG;
diff --git a/utils/functions/functions.js b/utils/functions/functions.js
index 10f65bc6d..41f3ccfbe 100644
--- a/utils/functions/functions.js
+++ b/utils/functions/functions.js
@@ -96,12 +96,12 @@ export const getUpdatedProducts = (
product.productId
);
- // If product exits ( index of that product found in the array ), update the product quantity and totalPrice
+ // If product exists ( index of that product was found in the array ), update the product quantity and totalPrice
if (-1 < productExitsIndex) {
let updatedProducts = existingProductsInCart;
let updatedProduct = updatedProducts[productExitsIndex];
- // If have new qty of the product available, set that else add the qtyToBeAdded
+ // If have new quantity of the product available, set that, else add the qtyToBeAdded
updatedProduct.qty = newQty
? parseInt(newQty)
: parseInt(updatedProduct.qty + qtyToBeAdded);