@gem-sdk/plugin-quick-view 1.11.1 → 1.21.1
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,7 +9,7 @@ var react = require('react');
|
|
|
9
9
|
|
|
10
10
|
const ModalContent = ()=>{
|
|
11
11
|
const product = core.useProduct();
|
|
12
|
-
const { data
|
|
12
|
+
const { data, isLoading: loading, error } = core.useProductQuery(product?.id);
|
|
13
13
|
if (loading) return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
14
14
|
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
15
15
|
className: "mx-auto my-20 h-8 w-8 animate-spin",
|
|
@@ -93,9 +93,7 @@ const ModalContent = ()=>{
|
|
|
93
93
|
styles: {
|
|
94
94
|
typography: {
|
|
95
95
|
type: 'subheading-2'
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
setting: {
|
|
96
|
+
},
|
|
99
97
|
priceType: 'regular'
|
|
100
98
|
}
|
|
101
99
|
})
|
|
@@ -105,9 +103,7 @@ const ModalContent = ()=>{
|
|
|
105
103
|
styles: {
|
|
106
104
|
typography: {
|
|
107
105
|
type: 'paragraph-2'
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
setting: {
|
|
106
|
+
},
|
|
111
107
|
priceType: 'compare'
|
|
112
108
|
}
|
|
113
109
|
})
|
|
@@ -127,7 +123,7 @@ const ModalContent = ()=>{
|
|
|
127
123
|
})
|
|
128
124
|
});
|
|
129
125
|
};
|
|
130
|
-
const ProductQuickView = ({ setting
|
|
126
|
+
const ProductQuickView = ({ setting })=>{
|
|
131
127
|
const [open, setOpen] = react.useState(false);
|
|
132
128
|
const plugins = core.usePluginEnable();
|
|
133
129
|
if (!plugins?.includes('quick-view')) {
|
|
@@ -5,7 +5,7 @@ import { useState } from 'react';
|
|
|
5
5
|
|
|
6
6
|
const ModalContent = ()=>{
|
|
7
7
|
const product = useProduct();
|
|
8
|
-
const { data
|
|
8
|
+
const { data, isLoading: loading, error } = useProductQuery(product?.id);
|
|
9
9
|
if (loading) return /*#__PURE__*/ jsx("div", {
|
|
10
10
|
children: /*#__PURE__*/ jsxs("svg", {
|
|
11
11
|
className: "mx-auto my-20 h-8 w-8 animate-spin",
|
|
@@ -89,9 +89,7 @@ const ModalContent = ()=>{
|
|
|
89
89
|
styles: {
|
|
90
90
|
typography: {
|
|
91
91
|
type: 'subheading-2'
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
setting: {
|
|
92
|
+
},
|
|
95
93
|
priceType: 'regular'
|
|
96
94
|
}
|
|
97
95
|
})
|
|
@@ -101,9 +99,7 @@ const ModalContent = ()=>{
|
|
|
101
99
|
styles: {
|
|
102
100
|
typography: {
|
|
103
101
|
type: 'paragraph-2'
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
setting: {
|
|
102
|
+
},
|
|
107
103
|
priceType: 'compare'
|
|
108
104
|
}
|
|
109
105
|
})
|
|
@@ -123,7 +119,7 @@ const ModalContent = ()=>{
|
|
|
123
119
|
})
|
|
124
120
|
});
|
|
125
121
|
};
|
|
126
|
-
const ProductQuickView = ({ setting
|
|
122
|
+
const ProductQuickView = ({ setting })=>{
|
|
127
123
|
const [open, setOpen] = useState(false);
|
|
128
124
|
const plugins = usePluginEnable();
|
|
129
125
|
if (!plugins?.includes('quick-view')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/plugin-quick-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"test": "jest -c ./../../helpers/jest.config.ts"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@gem-sdk/components": "1.
|
|
23
|
-
"@gem-sdk/core": "1.
|
|
24
|
-
"@gem-sdk/styles": "1.
|
|
22
|
+
"@gem-sdk/components": "1.21.0",
|
|
23
|
+
"@gem-sdk/core": "1.21.0",
|
|
24
|
+
"@gem-sdk/styles": "1.17.10"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^17 || ^18",
|