s-platform-landing-section 0.1.30 → 0.1.31

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.
@@ -329,7 +329,7 @@ var NavBar7 = function NavBar7(props) {
329
329
  top: "-100px"
330
330
  }
331
331
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
332
- className: "hidden lg:flex gap-6 justify-between items-center py-1.5 px-4 xl:px-20"
332
+ className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20"
333
333
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
334
334
  Link: Link,
335
335
  href: "/",
@@ -369,7 +369,7 @@ var NavBar7 = function NavBar7(props) {
369
369
  dropdownClassName: "right-0 top-8",
370
370
  className: "flex gap-4 items-center"
371
371
  }, /*#__PURE__*/React__default.createElement("div", {
372
- className: "font-semibold"
372
+ className: "font-semibold whitespace-nowrap"
373
373
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(IoChevronDownOutline, {
374
374
  className: "text-gray3",
375
375
  size: 24
@@ -382,16 +382,18 @@ var NavBar7 = function NavBar7(props) {
382
382
  href: "/dang-nhap"
383
383
  }, /*#__PURE__*/React__default.createElement(Button, {
384
384
  label: "Đăng nhập",
385
- shopConfigStyle: shopConfigStyle
385
+ shopConfigStyle: shopConfigStyle,
386
+ className: "whitespace-nowrap"
386
387
  })), /*#__PURE__*/React__default.createElement("a", {
387
388
  href: "https://sodofin.vn/account",
388
389
  target: "_blank"
389
390
  }, /*#__PURE__*/React__default.createElement(Button, {
390
391
  label: "Đăng ký",
391
392
  shopConfigStyle: shopConfigStyle,
392
- type: 'outline'
393
+ type: 'outline',
394
+ className: "whitespace-nowrap"
393
395
  })))), /*#__PURE__*/React__default.createElement("div", {
394
- className: "relative lg:hidden flex gap-4 items-center px-4 py-1.5"
396
+ className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
395
397
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
396
398
  Link: Link,
397
399
  href: "/",
@@ -660,7 +662,7 @@ var NavBar1 = function NavBar1(props) {
660
662
  dropdownClassName: "right-0 top-8",
661
663
  className: "flex gap-4 items-center"
662
664
  }, /*#__PURE__*/React__default.createElement("div", {
663
- className: "font-semibold"
665
+ className: "font-semibold whitespace-nowrap"
664
666
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(IoChevronDownOutline, {
665
667
  className: "text-gray3",
666
668
  size: 24
@@ -673,14 +675,16 @@ var NavBar1 = function NavBar1(props) {
673
675
  href: "/dang-nhap"
674
676
  }, /*#__PURE__*/React__default.createElement(Button, {
675
677
  label: "Đăng nhập",
676
- shopConfigStyle: shopConfigStyle
678
+ shopConfigStyle: shopConfigStyle,
679
+ className: "whitespace-nowrap"
677
680
  })), /*#__PURE__*/React__default.createElement("a", {
678
681
  href: "https://sodofin.vn/account",
679
682
  target: "_blank"
680
683
  }, /*#__PURE__*/React__default.createElement(Button, {
681
684
  label: "Đăng ký",
682
685
  shopConfigStyle: shopConfigStyle,
683
- type: 'outline'
686
+ type: 'outline',
687
+ className: "whitespace-nowrap"
684
688
  })))), /*#__PURE__*/React__default.createElement("div", {
685
689
  className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
686
690
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1103,7 +1107,8 @@ var Hero2 = function Hero2(props) {
1103
1107
  }), /*#__PURE__*/React__default.createElement("div", {
1104
1108
  className: "font-medium line-clamp-1 ",
1105
1109
  style: {
1106
- fontSize: "clamp(1.25rem, 3vw, 2.5rem)"
1110
+ fontSize: "clamp(1.25rem, 3vw, 3.5rem)",
1111
+ lineHeight: "1.5"
1107
1112
  }
1108
1113
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1109
1114
  className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
@@ -1152,7 +1157,7 @@ var Hero6 = function Hero6(props) {
1152
1157
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
1153
1158
  className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1154
1159
  }, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
1155
- className: "line-clamp-1 md:line-clamp-2",
1160
+ className: "line-clamp-1 md:line-clamp-2 pb-1",
1156
1161
  style: {
1157
1162
  fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1158
1163
  }
@@ -8048,6 +8053,16 @@ var Loading = function Loading(props) {
8048
8053
  });
8049
8054
  };
8050
8055
 
8056
+ var NotFoundProduct = function NotFoundProduct(props) {
8057
+ var _props$text = props.text,
8058
+ text = _props$text === void 0 ? "sản phẩm" : _props$text;
8059
+ return /*#__PURE__*/React__default.createElement("div", {
8060
+ className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8061
+ }, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
8062
+ size: 80
8063
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8064
+ };
8065
+
8051
8066
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8052
8067
  var _props$shopConfigStyl = props.shopConfigStyle,
8053
8068
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -8119,23 +8134,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8119
8134
  }, /*#__PURE__*/React__default.createElement(ProductItem1, {
8120
8135
  product: product === null || product === void 0 ? void 0 : product.productInfo
8121
8136
  }));
8122
- })) : /*#__PURE__*/React__default.createElement("div", {
8123
- className: "text-gray3 text-center p-12"
8124
- }, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
8137
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8138
+ text: "d\u1ECBch v\u1EE5"
8139
+ })), /*#__PURE__*/React__default.createElement(Dash, {
8125
8140
  color: secondary
8126
8141
  }));
8127
8142
  };
8128
8143
 
8129
- var NotFoundProduct = function NotFoundProduct(props) {
8130
- var _props$text = props.text,
8131
- text = _props$text === void 0 ? "sản phẩm" : _props$text;
8132
- return /*#__PURE__*/React__default.createElement("div", {
8133
- className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8134
- }, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
8135
- size: 80
8136
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8137
- };
8138
-
8139
8144
  var TreatmentsList6 = function TreatmentsList6(props) {
8140
8145
  var _products$slice;
8141
8146
  var data = props.data,
@@ -9400,7 +9405,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9400
9405
  key: index
9401
9406
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9402
9407
  product: product === null || product === void 0 ? void 0 : product.productInfo,
9403
- className: "aspect-video rounded-2xl"
9408
+ className: "!aspect-[16/11] rounded-2xl"
9404
9409
  }), /*#__PURE__*/React__default.createElement("div", {
9405
9410
  className: ''
9406
9411
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9855,7 +9860,7 @@ var ProductItem3 = function ProductItem3(props) {
9855
9860
  className: "w-full border border-stroke rounded-2xl " + className
9856
9861
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9857
9862
  product: product,
9858
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9863
+ className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
9859
9864
  }), /*#__PURE__*/React__default.createElement("div", {
9860
9865
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
9861
9866
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9947,7 +9952,7 @@ var ProductItem6 = function ProductItem6(props) {
9947
9952
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9948
9953
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9949
9954
  product: product,
9950
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
9955
+ className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
9951
9956
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9952
9957
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
9953
9958
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10003,7 +10008,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10003
10008
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10004
10009
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10005
10010
  product: product,
10006
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10011
+ className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10007
10012
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10008
10013
  className: "line-clamp-1 mb-2 font-medium text-lg"
10009
10014
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10201,47 +10206,65 @@ var Products2 = function Products2(props) {
10201
10206
  }), " "))));
10202
10207
  };
10203
10208
 
10204
- var Pagination = function Pagination(props) {
10205
- var _props$size = props.size,
10206
- size = _props$size === void 0 ? 24 : _props$size,
10207
- _props$className = props.className,
10208
- className = _props$className === void 0 ? "" : _props$className,
10209
- _props$total_pages = props.total_pages,
10210
- total_pages = _props$total_pages === void 0 ? 0 : _props$total_pages,
10211
- _props$has_next = props.has_next,
10212
- has_next = _props$has_next === void 0 ? true : _props$has_next,
10213
- _props$has_previous = props.has_previous,
10214
- has_previous = _props$has_previous === void 0 ? false : _props$has_previous,
10215
- _props$current_page = props.current_page,
10216
- current_page = _props$current_page === void 0 ? 0 : _props$current_page,
10217
- _props$onPageChange = props.onPageChange,
10218
- onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange;
10209
+ var Pagination = function Pagination(_ref) {
10210
+ var _ref$size = _ref.size,
10211
+ size = _ref$size === void 0 ? 24 : _ref$size,
10212
+ _ref$className = _ref.className,
10213
+ className = _ref$className === void 0 ? "" : _ref$className,
10214
+ _ref$total_pages = _ref.total_pages,
10215
+ total_pages = _ref$total_pages === void 0 ? 1 : _ref$total_pages,
10216
+ _ref$current_page = _ref.current_page,
10217
+ current_page = _ref$current_page === void 0 ? 1 : _ref$current_page,
10218
+ _ref$onPageChange = _ref.onPageChange,
10219
+ onPageChange = _ref$onPageChange === void 0 ? function () {} : _ref$onPageChange;
10219
10220
  var handlePageChange = function handlePageChange(page) {
10220
- onPageChange(page);
10221
+ if (page >= 0 && page <= total_pages - 1) {
10222
+ onPageChange(page);
10223
+ }
10224
+ };
10225
+ var generatePageNumbers = function generatePageNumbers() {
10226
+ if (total_pages <= 5) {
10227
+ return Array.from({
10228
+ length: total_pages
10229
+ }, function (_, i) {
10230
+ return i + 1;
10231
+ });
10232
+ }
10233
+ var pages = [1];
10234
+ if (current_page > 3) pages.push("...");
10235
+ var start = Math.max(2, current_page - 1);
10236
+ var end = Math.min(total_pages - 1, current_page + 2);
10237
+ for (var i = start; i <= end; i++) {
10238
+ pages.push(i);
10239
+ }
10240
+ if (current_page < total_pages - 2) pages.push("...");
10241
+ pages.push(total_pages);
10242
+ return pages;
10221
10243
  };
10222
10244
  return /*#__PURE__*/React__default.createElement("div", {
10223
- className: "flex gap-4 items-center justify-self-center " + className
10245
+ className: "flex gap-4 justify-center items-center " + className
10224
10246
  }, /*#__PURE__*/React__default.createElement(IoChevronBackOutline, {
10225
- className: has_previous ? "text-primary cursor-pointer" : "text-gray3",
10247
+ className: current_page > 0 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10226
10248
  size: size,
10227
10249
  onClick: function onClick() {
10228
- if (has_previous) handlePageChange(current_page - 1);
10250
+ return handlePageChange(current_page - 1);
10229
10251
  }
10230
10252
  }), /*#__PURE__*/React__default.createElement("div", {
10231
10253
  className: "flex items-center space-x-1"
10232
- }, Array(total_pages).fill().map(function (_, index) {
10254
+ }, generatePageNumbers().map(function (page, index) {
10233
10255
  return /*#__PURE__*/React__default.createElement("button", {
10234
10256
  key: index,
10235
10257
  onClick: function onClick() {
10236
- return handlePageChange(index);
10258
+ return typeof page === "number" && handlePageChange(page - 1);
10237
10259
  },
10238
- className: "px-4 py-1 rounded-md " + (index === current_page ? 'bg-primary text-textButton' : 'bg-transparent text-primary') + " hover:opacity-80"
10239
- }, index + 1);
10260
+ className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10261
+ disabled: page === "..."
10262
+ }, page);
10240
10263
  })), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
10241
- className: has_next ? "text-primary cursor-pointer" : "text-gray3",
10264
+ className: current_page < total_pages - 1 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10242
10265
  size: size,
10243
10266
  onClick: function onClick() {
10244
- if (has_next) handlePageChange(current_page + 1);
10267
+ return handlePageChange(current_page + 1);
10245
10268
  }
10246
10269
  }));
10247
10270
  };
@@ -10265,11 +10288,9 @@ var Products3 = function Products3(props) {
10265
10288
  }),
10266
10289
  productParams = _useState[0],
10267
10290
  setProductParams = _useState[1];
10268
- var _useState2 = useState(false),
10269
- setIsAutoGetList = _useState2[1];
10270
- var _useState3 = useState(),
10271
- categorySelected = _useState3[0],
10272
- setCategorySelected = _useState3[1];
10291
+ var _useState2 = useState(),
10292
+ categorySelected = _useState2[0],
10293
+ setCategorySelected = _useState2[1];
10273
10294
  var _ProductController = ProductController(_extends({}, props, {
10274
10295
  params: productParams
10275
10296
  })),
@@ -10283,16 +10304,12 @@ var Products3 = function Products3(props) {
10283
10304
  }
10284
10305
  })),
10285
10306
  categories = _CategoryController.categories;
10286
- useEffect(function () {
10287
- setCategorySelected(categories === null || categories === void 0 ? void 0 : categories[0]);
10288
- }, [categories]);
10289
10307
  useEffect(function () {
10290
10308
  if (categorySelected) {
10291
10309
  setProductParams(_extends({}, productParams, {
10292
10310
  page: 0,
10293
10311
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
10294
10312
  }));
10295
- setIsAutoGetList(true);
10296
10313
  }
10297
10314
  }, [categorySelected]);
10298
10315
  var onSelectCategory = function onSelectCategory(category) {
@@ -10316,7 +10333,16 @@ var Products3 = function Products3(props) {
10316
10333
  className: "text-xl"
10317
10334
  }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
10318
10335
  className: "overflow-y-auto max-h-96"
10319
- }, categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10336
+ }, /*#__PURE__*/React__default.createElement("div", {
10337
+ className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
10338
+ onClick: function onClick() {
10339
+ return onSelectCategory({
10340
+ categoryId: undefined
10341
+ });
10342
+ }
10343
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10344
+ size: 24
10345
+ }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10320
10346
  return /*#__PURE__*/React__default.createElement("div", {
10321
10347
  className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
10322
10348
  key: index,
@@ -10331,7 +10357,7 @@ var Products3 = function Products3(props) {
10331
10357
  }), /*#__PURE__*/React__default.createElement("div", {
10332
10358
  className: "col-span-3 text-center"
10333
10359
  }, loading ? /*#__PURE__*/React__default.createElement("div", {
10334
- className: "flex w-full justify-center p-12"
10360
+ className: "flex w-full justify-center items-center p-12 h-[700px]"
10335
10361
  }, /*#__PURE__*/React__default.createElement(Loading, {
10336
10362
  size: 32
10337
10363
  })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
@@ -10557,10 +10583,8 @@ var Products11 = function Products11(props) {
10557
10583
  }
10558
10584
  }, [categories]);
10559
10585
  useEffect(function () {
10560
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
10561
- setProductsFilter(products);
10562
- }
10563
- }, [products]);
10586
+ setProductsFilter(products);
10587
+ }, [products, categorySelected]);
10564
10588
  var handleFilter = function handleFilter(item) {
10565
10589
  setFilterItem(item);
10566
10590
  if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
@@ -10577,14 +10601,18 @@ var Products11 = function Products11(props) {
10577
10601
  });
10578
10602
  setProductsFilter(_productsCopy);
10579
10603
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10580
- var _productsCopy3;
10581
- var _productsCopy2 = [].concat(products);
10582
- _productsCopy2 = (_productsCopy3 = _productsCopy2) === null || _productsCopy3 === void 0 ? void 0 : _productsCopy3.filter(function (product) {
10583
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10604
+ setParams(function (prev) {
10605
+ return _extends({}, prev, {
10606
+ isHighlight: true
10607
+ });
10584
10608
  });
10585
- setProductsFilter(_productsCopy2);
10586
10609
  } else {
10587
- setProductsFilter(products);
10610
+ setParams(function (prev) {
10611
+ return _extends({}, prev, {
10612
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10613
+ size: 12
10614
+ });
10615
+ });
10588
10616
  }
10589
10617
  };
10590
10618
  return /*#__PURE__*/React__default.createElement("div", {
@@ -10592,7 +10620,7 @@ var Products11 = function Products11(props) {
10592
10620
  }, /*#__PURE__*/React__default.createElement("div", {
10593
10621
  className: "md:sticky top-0 self-start"
10594
10622
  }, /*#__PURE__*/React__default.createElement("div", {
10595
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4"
10623
+ className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10596
10624
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10597
10625
  return /*#__PURE__*/React__default.createElement("div", {
10598
10626
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -10775,19 +10803,24 @@ var ProductSearch1 = function ProductSearch1(props) {
10775
10803
  setProductsFilter = _useState[1];
10776
10804
  var _useState2 = useState({
10777
10805
  productName: keywordValue,
10778
- size: 20
10806
+ size: 12
10779
10807
  }),
10780
10808
  params = _useState2[0],
10781
10809
  setParams = _useState2[1];
10782
10810
  var _useState3 = useState(true),
10783
10811
  isGetMore = _useState3[0],
10784
10812
  setIsGetMore = _useState3[1];
10813
+ var _useState4 = useState(false),
10814
+ isAutoGetList = _useState4[0],
10815
+ setIsAutoGetList = _useState4[1];
10785
10816
  var _ProductController = ProductController(_extends({}, props, {
10786
- params: params
10817
+ params: params,
10818
+ isAutoGetList: isAutoGetList
10787
10819
  })),
10788
10820
  products = _ProductController.products,
10789
10821
  loading = _ProductController.loading;
10790
10822
  useEffect(function () {
10823
+ setIsAutoGetList(true);
10791
10824
  setParams(function (prev) {
10792
10825
  return _extends({}, prev, {
10793
10826
  productName: keywordValue
@@ -10813,14 +10846,16 @@ var ProductSearch1 = function ProductSearch1(props) {
10813
10846
  });
10814
10847
  setProductsFilter(productsCopy);
10815
10848
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10816
- var _productsCopy2;
10817
- var _productsCopy = [].concat(products);
10818
- _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
10819
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10849
+ setParams(function (prev) {
10850
+ return _extends({}, prev, {
10851
+ isHighlight: true
10852
+ });
10820
10853
  });
10821
- setProductsFilter(_productsCopy);
10822
10854
  } else {
10823
- setProductsFilter(products);
10855
+ setParams({
10856
+ size: 12,
10857
+ productName: keywordValue
10858
+ });
10824
10859
  }
10825
10860
  };
10826
10861
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13743,7 +13778,11 @@ var SearchBar2 = function SearchBar2(props) {
13743
13778
  var _useState2 = useState(""),
13744
13779
  valueSearch = _useState2[0],
13745
13780
  setSearchValue = _useState2[1];
13746
- var _ProductController = ProductController(_extends({}, props)),
13781
+ var _useState3 = useState(false),
13782
+ isAutoGetList = _useState3[0];
13783
+ var _ProductController = ProductController(_extends({}, props, {
13784
+ isAutoGetList: isAutoGetList
13785
+ })),
13747
13786
  getProductListSearch = _ProductController.getProductListSearch;
13748
13787
  useEffect(function () {
13749
13788
  if (valueSearch === "") {
@@ -13788,7 +13827,7 @@ var SearchBar2 = function SearchBar2(props) {
13788
13827
  backgroundSize: "cover"
13789
13828
  }
13790
13829
  }, /*#__PURE__*/React__default.createElement("div", {
13791
- className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
13830
+ className: "w-full md:w-2/3 lg:w-1/2 py-6 mx-auto md:px-6 flex flex-col h-full gap-4"
13792
13831
  }, /*#__PURE__*/React__default.createElement(Input, {
13793
13832
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
13794
13833
  className: "text-gray3"
@@ -13816,9 +13855,7 @@ var SearchBar2 = function SearchBar2(props) {
13816
13855
  }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
13817
13856
  product: item === null || item === void 0 ? void 0 : item.productInfo
13818
13857
  })));
13819
- })) : /*#__PURE__*/React__default.createElement("div", {
13820
- className: "mx-auto"
13821
- }, data === null || data === void 0 ? void 0 : data.sectionDescription))));
13858
+ })) : null)));
13822
13859
  };
13823
13860
 
13824
13861
  var SearchBar5 = function SearchBar5(props) {
@@ -13939,8 +13976,9 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13939
13976
  Link = _props$Link === void 0 ? null : _props$Link;
13940
13977
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13941
13978
  return /*#__PURE__*/React__default.createElement("div", {
13942
- className: SECTION_CLASS + " my-0 md:my-0 !bg-bgSecondary py-6 grid grid-cols-2 md:grid-cols-4 gap-4 lg:gap-6"
13979
+ className: SECTION_CLASS + " my-0 md:my-0 !bg-bgSecondary py-6 grid grid-cols-2 lg:grid-cols-4 gap-4 lg:gap-6"
13943
13980
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
13981
+ var _item$title;
13944
13982
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13945
13983
  Link: Link,
13946
13984
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
@@ -13958,7 +13996,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13958
13996
  className: "w-16 h-16 p-3 rounded-full bg-primary"
13959
13997
  }), /*#__PURE__*/React__default.createElement("div", {
13960
13998
  className: "font-medium text-lg"
13961
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
13999
+ }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
13962
14000
  className: "flex-grow text-gray3 leading-relaxed"
13963
14001
  }, item === null || item === void 0 ? void 0 : item.description)));
13964
14002
  }));
@@ -13972,6 +14010,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13972
14010
  return /*#__PURE__*/React__default.createElement("div", {
13973
14011
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
13974
14012
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
14013
+ var _item$title;
13975
14014
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13976
14015
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13977
14016
  Link: Link
@@ -13988,8 +14027,8 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13988
14027
  alt: "logo",
13989
14028
  className: "w-16 h-16 rounded-full bg-primary"
13990
14029
  }), /*#__PURE__*/React__default.createElement("div", {
13991
- className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
13992
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
14030
+ className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
14031
+ }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
13993
14032
  className: "flex-grow leading-relaxed"
13994
14033
  }, item === null || item === void 0 ? void 0 : item.description)));
13995
14034
  }));