@graphcommerce/magento-cart 9.1.0-canary.21 → 9.1.0-canary.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.1.0-canary.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2521](https://github.com/graphcommerce-org/graphcommerce/pull/2521) [`6847259`](https://github.com/graphcommerce-org/graphcommerce/commit/6847259715b0cebcc3f7415ed06cc38814663811) - Solve typescript issue were product types were added incorrectly. ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 9.1.0-canary.22
|
|
10
|
+
|
|
3
11
|
## 9.1.0-canary.21
|
|
4
12
|
|
|
5
13
|
## 9.1.0-canary.20
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useQuery } from '@graphcommerce/graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { nonNullable } from '@graphcommerce/next-ui'
|
|
3
3
|
import { useRouter } from 'next/router'
|
|
4
4
|
import { useMemo } from 'react'
|
|
5
5
|
import { useCartQuery } from '../../hooks'
|
|
@@ -10,7 +10,7 @@ const crossSellsHideCartItems = Boolean(import.meta.graphCommerce.crossSellsHide
|
|
|
10
10
|
|
|
11
11
|
export function useCrosssellItems() {
|
|
12
12
|
const cartAdded = useCartQuery(CartAddedDocument)
|
|
13
|
-
const items =
|
|
13
|
+
const items = (cartAdded.data?.cart?.items ?? []).filter(nonNullable)
|
|
14
14
|
const router = useRouter()
|
|
15
15
|
|
|
16
16
|
const sku =
|
|
@@ -30,7 +30,8 @@ export function useCrosssellItems() {
|
|
|
30
30
|
|
|
31
31
|
const crossSellItems = useMemo(
|
|
32
32
|
() =>
|
|
33
|
-
|
|
33
|
+
(data ?? [])
|
|
34
|
+
.filter(nonNullable)
|
|
34
35
|
.filter((item) => item.stock_status === 'IN_STOCK')
|
|
35
36
|
.filter(
|
|
36
37
|
(item) => !crossSellsHideCartItems || items.every((i) => i.product.sku !== item.sku),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.1.0-canary.
|
|
5
|
+
"version": "9.1.0-canary.23",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
17
|
-
"@graphcommerce/framer-next-pages": "^9.1.0-canary.
|
|
18
|
-
"@graphcommerce/framer-scroller": "^9.1.0-canary.
|
|
19
|
-
"@graphcommerce/framer-utils": "^9.1.0-canary.
|
|
20
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
|
21
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
|
22
|
-
"@graphcommerce/magento-customer": "^9.1.0-canary.
|
|
23
|
-
"@graphcommerce/magento-graphql": "^9.1.0-canary.
|
|
24
|
-
"@graphcommerce/magento-store": "^9.1.0-canary.
|
|
25
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
|
26
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
27
|
-
"@graphcommerce/react-hook-form": "^9.1.0-canary.
|
|
28
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.23",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.23",
|
|
17
|
+
"@graphcommerce/framer-next-pages": "^9.1.0-canary.23",
|
|
18
|
+
"@graphcommerce/framer-scroller": "^9.1.0-canary.23",
|
|
19
|
+
"@graphcommerce/framer-utils": "^9.1.0-canary.23",
|
|
20
|
+
"@graphcommerce/graphql": "^9.1.0-canary.23",
|
|
21
|
+
"@graphcommerce/image": "^9.1.0-canary.23",
|
|
22
|
+
"@graphcommerce/magento-customer": "^9.1.0-canary.23",
|
|
23
|
+
"@graphcommerce/magento-graphql": "^9.1.0-canary.23",
|
|
24
|
+
"@graphcommerce/magento-store": "^9.1.0-canary.23",
|
|
25
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.23",
|
|
26
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.23",
|
|
27
|
+
"@graphcommerce/react-hook-form": "^9.1.0-canary.23",
|
|
28
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.23",
|
|
29
29
|
"@lingui/core": "^4.2.1",
|
|
30
30
|
"@lingui/macro": "^4.2.1",
|
|
31
31
|
"@lingui/react": "^4.2.1",
|