@gem-sdk/core 1.10.38 → 1.10.39
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.
|
@@ -9,9 +9,11 @@ var query = require('../../helpers/query.js');
|
|
|
9
9
|
const useCollectionQuery = (args, options)=>{
|
|
10
10
|
const fetcher = useFetchHandle.useFetchHandle();
|
|
11
11
|
const isSample = shop.useIsSampleProduct();
|
|
12
|
+
const isStorefront = shop.useIsStorefrontProduct();
|
|
12
13
|
return useSWR(args ? query.generateCollectionQueryKey({
|
|
13
14
|
...args,
|
|
14
|
-
isSample
|
|
15
|
+
isSample,
|
|
16
|
+
isStorefront
|
|
15
17
|
}) : null, ([, arg])=>{
|
|
16
18
|
return getCollection.getCollection(fetcher, arg);
|
|
17
19
|
}, options);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import useSWR from 'swr';
|
|
2
2
|
import { getCollection } from '../../helpers/queries/get-collection.js';
|
|
3
|
-
import { useIsSampleProduct } from '../shop.js';
|
|
3
|
+
import { useIsSampleProduct, useIsStorefrontProduct } from '../shop.js';
|
|
4
4
|
import { useFetchHandle } from '../useFetchHandle.js';
|
|
5
5
|
import { generateCollectionQueryKey } from '../../helpers/query.js';
|
|
6
6
|
|
|
7
7
|
const useCollectionQuery = (args, options)=>{
|
|
8
8
|
const fetcher = useFetchHandle();
|
|
9
9
|
const isSample = useIsSampleProduct();
|
|
10
|
+
const isStorefront = useIsStorefrontProduct();
|
|
10
11
|
return useSWR(args ? generateCollectionQueryKey({
|
|
11
12
|
...args,
|
|
12
|
-
isSample
|
|
13
|
+
isSample,
|
|
14
|
+
isStorefront
|
|
13
15
|
}) : null, ([, arg])=>{
|
|
14
16
|
return getCollection(fetcher, arg);
|
|
15
17
|
}, options);
|