@gem-sdk/plugin-loox 1.11.1-staging-66146a03 → 1.12.0-experimental-8f483e48

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.
@@ -6,41 +6,29 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var react = require('react');
7
7
  var Script = require('next/script');
8
8
 
9
- const ProductReview = ({ productId , type , shop })=>{
10
- const props = react.useMemo(()=>{
11
- switch(type){
9
+ const ProductReview = ({ productId, type, shop }) => {
10
+ const props = react.useMemo(() => {
11
+ switch (type) {
12
12
  case 'star':
13
13
  return {
14
14
  'data-fetch': true,
15
15
  className: 'loox-rating',
16
- 'data-id': productId
16
+ 'data-id': productId,
17
17
  };
18
18
  case 'carousel':
19
19
  return {
20
20
  id: 'looxCarousel',
21
21
  'data-show-more': true,
22
- 'data-product-ids': productId
22
+ 'data-product-ids': productId,
23
23
  };
24
24
  default:
25
25
  return {
26
26
  id: 'looxReviews',
27
- 'data-product-id': productId
27
+ 'data-product-id': productId,
28
28
  };
29
29
  }
30
- }, [
31
- productId,
32
- type
33
- ]);
34
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
35
- children: [
36
- /*#__PURE__*/ jsxRuntime.jsx(Script, {
37
- src: `//loox.io/widget/loox.js?shop=${shop}`
38
- }),
39
- /*#__PURE__*/ jsxRuntime.jsx("div", {
40
- ...props
41
- })
42
- ]
43
- });
30
+ }, [productId, type]);
31
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Script, { src: `//loox.io/widget/loox.js?shop=${shop}` }), jsxRuntime.jsx("div", { ...props })] }));
44
32
  };
45
33
 
46
34
  exports.default = ProductReview;
@@ -2,41 +2,29 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { useMemo } from 'react';
3
3
  import Script from 'next/script';
4
4
 
5
- const ProductReview = ({ productId , type , shop })=>{
6
- const props = useMemo(()=>{
7
- switch(type){
5
+ const ProductReview = ({ productId, type, shop }) => {
6
+ const props = useMemo(() => {
7
+ switch (type) {
8
8
  case 'star':
9
9
  return {
10
10
  'data-fetch': true,
11
11
  className: 'loox-rating',
12
- 'data-id': productId
12
+ 'data-id': productId,
13
13
  };
14
14
  case 'carousel':
15
15
  return {
16
16
  id: 'looxCarousel',
17
17
  'data-show-more': true,
18
- 'data-product-ids': productId
18
+ 'data-product-ids': productId,
19
19
  };
20
20
  default:
21
21
  return {
22
22
  id: 'looxReviews',
23
- 'data-product-id': productId
23
+ 'data-product-id': productId,
24
24
  };
25
25
  }
26
- }, [
27
- productId,
28
- type
29
- ]);
30
- return /*#__PURE__*/ jsxs(Fragment, {
31
- children: [
32
- /*#__PURE__*/ jsx(Script, {
33
- src: `//loox.io/widget/loox.js?shop=${shop}`
34
- }),
35
- /*#__PURE__*/ jsx("div", {
36
- ...props
37
- })
38
- ]
39
- });
26
+ }, [productId, type]);
27
+ return (jsxs(Fragment, { children: [jsx(Script, { src: `//loox.io/widget/loox.js?shop=${shop}` }), jsx("div", { ...props })] }));
40
28
  };
41
29
 
42
30
  export { ProductReview as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/plugin-loox",
3
- "version": "1.11.1-staging-66146a03",
3
+ "version": "1.12.0-experimental-8f483e48",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -19,10 +19,10 @@
19
19
  "test": "jest -c ./../../helpers/jest.config.ts"
20
20
  },
21
21
  "dependencies": {
22
- "@gem-sdk/styles": "1.12.0-staging-66146a03"
22
+ "@gem-sdk/styles": "1.12.0-experimental-8f483e48"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "1.11.1-staging-66146a03"
25
+ "@gem-sdk/core": "1.12.0-experimental-8f483e48"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^17 || ^18",