s-platform-landing-section 0.1.15 → 0.1.16

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/dist/index.js CHANGED
@@ -214,7 +214,7 @@ var Options = function Options(props) {
214
214
  };
215
215
 
216
216
  var NavBar7 = function NavBar7(props) {
217
- var _routes$find, _routes$filter, _routes$filter2;
217
+ var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
218
218
  var _useState = React.useState(false),
219
219
  isOpen = _useState[0],
220
220
  setIsOpen = _useState[1];
@@ -260,17 +260,6 @@ var NavBar7 = function NavBar7(props) {
260
260
  className: "text-gray3"
261
261
  })
262
262
  }];
263
- React.useEffect(function () {
264
- if ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "cafe_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "grocery_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "fashion_1") {
265
- routes === null || routes === void 0 ? void 0 : routes.forEach(function (route) {
266
- if ((route === null || route === void 0 ? void 0 : route.name) === "home" || (route === null || route === void 0 ? void 0 : route.name) === "products" || (route === null || route === void 0 ? void 0 : route.name) === "about") {
267
- route.isShow = true;
268
- } else {
269
- route.isShow = false;
270
- }
271
- });
272
- }
273
- }, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode]);
274
263
  React.useEffect(function () {
275
264
  var totalItem = cartItems === null || cartItems === void 0 ? void 0 : cartItems.reduce(function (total, item) {
276
265
  return total + (item === null || item === void 0 ? void 0 : item.quantity);
@@ -309,9 +298,9 @@ var NavBar7 = function NavBar7(props) {
309
298
  className: "text-xl md:text-2xl whitespace-nowrap font-semibold text-primary"
310
299
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
311
300
  className: "hidden lg:flex flex-1 items-center gap-4"
312
- }, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
301
+ }, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
313
302
  return e === null || e === void 0 ? void 0 : e.isShow;
314
- })) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (item, index) {
303
+ })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
315
304
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
316
305
  Link: Link,
317
306
  href: item === null || item === void 0 ? void 0 : item.route,
@@ -394,9 +383,9 @@ var NavBar7 = function NavBar7(props) {
394
383
  }
395
384
  }, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
396
385
  size: 24
397
- })), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : (_routes$filter2 = routes.filter(function (e) {
386
+ })), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
398
387
  return e === null || e === void 0 ? void 0 : e.isShow;
399
- })) === null || _routes$filter2 === void 0 ? void 0 : _routes$filter2.map(function (item, index) {
388
+ })) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
400
389
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
401
390
  Link: Link,
402
391
  href: item === null || item === void 0 ? void 0 : item.route,
@@ -408,7 +397,7 @@ var NavBar7 = function NavBar7(props) {
408
397
  };
409
398
 
410
399
  var NavBar1 = function NavBar1(props) {
411
- var _routes$find, _routes$filter, _routes$filter2;
400
+ var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
412
401
  var _useState = React.useState(false),
413
402
  isOpen = _useState[0],
414
403
  setIsOpen = _useState[1];
@@ -454,17 +443,6 @@ var NavBar1 = function NavBar1(props) {
454
443
  className: "text-gray3"
455
444
  })
456
445
  }];
457
- React.useEffect(function () {
458
- if ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "cafe_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "grocery_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "fashion_1") {
459
- routes === null || routes === void 0 ? void 0 : routes.forEach(function (route) {
460
- if ((route === null || route === void 0 ? void 0 : route.name) === "home" || (route === null || route === void 0 ? void 0 : route.name) === "products" || (route === null || route === void 0 ? void 0 : route.name) === "about") {
461
- route.isShow = true;
462
- } else {
463
- route.isShow = false;
464
- }
465
- });
466
- }
467
- }, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode]);
468
446
  React.useEffect(function () {
469
447
  var totalItem = cartItems === null || cartItems === void 0 ? void 0 : cartItems.reduce(function (total, item) {
470
448
  return total + (item === null || item === void 0 ? void 0 : item.quantity);
@@ -522,9 +500,9 @@ var NavBar1 = function NavBar1(props) {
522
500
  className: "text-xl md:text-2xl whitespace-nowrap font-semibold text-primary"
523
501
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
524
502
  className: "hidden lg:flex flex-1 items-center gap-4"
525
- }, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
503
+ }, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
526
504
  return e === null || e === void 0 ? void 0 : e.isShow;
527
- })) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (item, index) {
505
+ })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
528
506
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
529
507
  Link: Link,
530
508
  href: item === null || item === void 0 ? void 0 : item.route,
@@ -614,9 +592,9 @@ var NavBar1 = function NavBar1(props) {
614
592
  }
615
593
  }, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
616
594
  size: 24
617
- }))), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : (_routes$filter2 = routes.filter(function (e) {
595
+ }))), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
618
596
  return e === null || e === void 0 ? void 0 : e.isShow;
619
- })) === null || _routes$filter2 === void 0 ? void 0 : _routes$filter2.map(function (item, index) {
597
+ })) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
620
598
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
621
599
  Link: Link,
622
600
  href: item === null || item === void 0 ? void 0 : item.route,
@@ -9575,7 +9553,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
9575
9553
  }))));
9576
9554
  };
9577
9555
 
9578
- var ProductsList7 = function ProductsList7(props) {
9556
+ var ProductList7 = function ProductList7(props) {
9579
9557
  var _props$shopConfigStyl = props.shopConfigStyle,
9580
9558
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
9581
9559
  _props$data = props.data,
@@ -12937,12 +12915,12 @@ exports.ProductItem5 = ProductItem5;
12937
12915
  exports.ProductItem6 = ProductItem6;
12938
12916
  exports.ProductItem7 = ProductItem7;
12939
12917
  exports.ProductList5 = ProductList5;
12918
+ exports.ProductList7 = ProductList7;
12940
12919
  exports.ProductSale2 = ProductSale2;
12941
12920
  exports.ProductSearch1 = ProductSearch1;
12942
12921
  exports.Products10 = Products10;
12943
12922
  exports.Products2 = Products2;
12944
12923
  exports.Products3 = Products3;
12945
- exports.ProductsList7 = ProductsList7;
12946
12924
  exports.ProductsTop1 = ProductsTop1;
12947
12925
  exports.SearchBar2 = SearchBar2;
12948
12926
  exports.SearchBar5 = SearchBar5;