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.
package/dist/index.js CHANGED
@@ -332,7 +332,7 @@ var NavBar7 = function NavBar7(props) {
332
332
  top: "-100px"
333
333
  }
334
334
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
335
- className: "hidden lg:flex gap-6 justify-between items-center py-1.5 px-4 xl:px-20"
335
+ className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20"
336
336
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
337
337
  Link: Link,
338
338
  href: "/",
@@ -372,7 +372,7 @@ var NavBar7 = function NavBar7(props) {
372
372
  dropdownClassName: "right-0 top-8",
373
373
  className: "flex gap-4 items-center"
374
374
  }, /*#__PURE__*/React__default.createElement("div", {
375
- className: "font-semibold"
375
+ className: "font-semibold whitespace-nowrap"
376
376
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(io5.IoChevronDownOutline, {
377
377
  className: "text-gray3",
378
378
  size: 24
@@ -385,16 +385,18 @@ var NavBar7 = function NavBar7(props) {
385
385
  href: "/dang-nhap"
386
386
  }, /*#__PURE__*/React__default.createElement(Button, {
387
387
  label: "Đăng nhập",
388
- shopConfigStyle: shopConfigStyle
388
+ shopConfigStyle: shopConfigStyle,
389
+ className: "whitespace-nowrap"
389
390
  })), /*#__PURE__*/React__default.createElement("a", {
390
391
  href: "https://sodofin.vn/account",
391
392
  target: "_blank"
392
393
  }, /*#__PURE__*/React__default.createElement(Button, {
393
394
  label: "Đăng ký",
394
395
  shopConfigStyle: shopConfigStyle,
395
- type: 'outline'
396
+ type: 'outline',
397
+ className: "whitespace-nowrap"
396
398
  })))), /*#__PURE__*/React__default.createElement("div", {
397
- className: "relative lg:hidden flex gap-4 items-center px-4 py-1.5"
399
+ className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
398
400
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
399
401
  Link: Link,
400
402
  href: "/",
@@ -663,7 +665,7 @@ var NavBar1 = function NavBar1(props) {
663
665
  dropdownClassName: "right-0 top-8",
664
666
  className: "flex gap-4 items-center"
665
667
  }, /*#__PURE__*/React__default.createElement("div", {
666
- className: "font-semibold"
668
+ className: "font-semibold whitespace-nowrap"
667
669
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(io5.IoChevronDownOutline, {
668
670
  className: "text-gray3",
669
671
  size: 24
@@ -676,14 +678,16 @@ var NavBar1 = function NavBar1(props) {
676
678
  href: "/dang-nhap"
677
679
  }, /*#__PURE__*/React__default.createElement(Button, {
678
680
  label: "Đăng nhập",
679
- shopConfigStyle: shopConfigStyle
681
+ shopConfigStyle: shopConfigStyle,
682
+ className: "whitespace-nowrap"
680
683
  })), /*#__PURE__*/React__default.createElement("a", {
681
684
  href: "https://sodofin.vn/account",
682
685
  target: "_blank"
683
686
  }, /*#__PURE__*/React__default.createElement(Button, {
684
687
  label: "Đăng ký",
685
688
  shopConfigStyle: shopConfigStyle,
686
- type: 'outline'
689
+ type: 'outline',
690
+ className: "whitespace-nowrap"
687
691
  })))), /*#__PURE__*/React__default.createElement("div", {
688
692
  className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
689
693
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1106,7 +1110,8 @@ var Hero2 = function Hero2(props) {
1106
1110
  }), /*#__PURE__*/React__default.createElement("div", {
1107
1111
  className: "font-medium line-clamp-1 ",
1108
1112
  style: {
1109
- fontSize: "clamp(1.25rem, 3vw, 2.5rem)"
1113
+ fontSize: "clamp(1.25rem, 3vw, 3.5rem)",
1114
+ lineHeight: "1.5"
1110
1115
  }
1111
1116
  }, 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", {
1112
1117
  className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
@@ -1155,7 +1160,7 @@ var Hero6 = function Hero6(props) {
1155
1160
  }, 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", {
1156
1161
  className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1157
1162
  }, 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", {
1158
- className: "line-clamp-1 md:line-clamp-2",
1163
+ className: "line-clamp-1 md:line-clamp-2 pb-1",
1159
1164
  style: {
1160
1165
  fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1161
1166
  }
@@ -8051,6 +8056,16 @@ var Loading = function Loading(props) {
8051
8056
  });
8052
8057
  };
8053
8058
 
8059
+ var NotFoundProduct = function NotFoundProduct(props) {
8060
+ var _props$text = props.text,
8061
+ text = _props$text === void 0 ? "sản phẩm" : _props$text;
8062
+ return /*#__PURE__*/React__default.createElement("div", {
8063
+ className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8064
+ }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
8065
+ size: 80
8066
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8067
+ };
8068
+
8054
8069
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8055
8070
  var _props$shopConfigStyl = props.shopConfigStyle,
8056
8071
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -8122,23 +8137,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8122
8137
  }, /*#__PURE__*/React__default.createElement(ProductItem1, {
8123
8138
  product: product === null || product === void 0 ? void 0 : product.productInfo
8124
8139
  }));
8125
- })) : /*#__PURE__*/React__default.createElement("div", {
8126
- className: "text-gray3 text-center p-12"
8127
- }, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
8140
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8141
+ text: "d\u1ECBch v\u1EE5"
8142
+ })), /*#__PURE__*/React__default.createElement(Dash, {
8128
8143
  color: secondary
8129
8144
  }));
8130
8145
  };
8131
8146
 
8132
- var NotFoundProduct = function NotFoundProduct(props) {
8133
- var _props$text = props.text,
8134
- text = _props$text === void 0 ? "sản phẩm" : _props$text;
8135
- return /*#__PURE__*/React__default.createElement("div", {
8136
- className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8137
- }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
8138
- size: 80
8139
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8140
- };
8141
-
8142
8147
  var TreatmentsList6 = function TreatmentsList6(props) {
8143
8148
  var _products$slice;
8144
8149
  var data = props.data,
@@ -9403,7 +9408,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9403
9408
  key: index
9404
9409
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9405
9410
  product: product === null || product === void 0 ? void 0 : product.productInfo,
9406
- className: "aspect-video rounded-2xl"
9411
+ className: "!aspect-[16/11] rounded-2xl"
9407
9412
  }), /*#__PURE__*/React__default.createElement("div", {
9408
9413
  className: ''
9409
9414
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9858,7 +9863,7 @@ var ProductItem3 = function ProductItem3(props) {
9858
9863
  className: "w-full border border-stroke rounded-2xl " + className
9859
9864
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9860
9865
  product: product,
9861
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9866
+ className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
9862
9867
  }), /*#__PURE__*/React__default.createElement("div", {
9863
9868
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
9864
9869
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9950,7 +9955,7 @@ var ProductItem6 = function ProductItem6(props) {
9950
9955
  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
9951
9956
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9952
9957
  product: product,
9953
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
9958
+ className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
9954
9959
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9955
9960
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
9956
9961
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10006,7 +10011,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10006
10011
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10007
10012
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10008
10013
  product: product,
10009
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10014
+ className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10010
10015
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10011
10016
  className: "line-clamp-1 mb-2 font-medium text-lg"
10012
10017
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10204,47 +10209,65 @@ var Products2 = function Products2(props) {
10204
10209
  }), " "))));
10205
10210
  };
10206
10211
 
10207
- var Pagination = function Pagination(props) {
10208
- var _props$size = props.size,
10209
- size = _props$size === void 0 ? 24 : _props$size,
10210
- _props$className = props.className,
10211
- className = _props$className === void 0 ? "" : _props$className,
10212
- _props$total_pages = props.total_pages,
10213
- total_pages = _props$total_pages === void 0 ? 0 : _props$total_pages,
10214
- _props$has_next = props.has_next,
10215
- has_next = _props$has_next === void 0 ? true : _props$has_next,
10216
- _props$has_previous = props.has_previous,
10217
- has_previous = _props$has_previous === void 0 ? false : _props$has_previous,
10218
- _props$current_page = props.current_page,
10219
- current_page = _props$current_page === void 0 ? 0 : _props$current_page,
10220
- _props$onPageChange = props.onPageChange,
10221
- onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange;
10212
+ var Pagination = function Pagination(_ref) {
10213
+ var _ref$size = _ref.size,
10214
+ size = _ref$size === void 0 ? 24 : _ref$size,
10215
+ _ref$className = _ref.className,
10216
+ className = _ref$className === void 0 ? "" : _ref$className,
10217
+ _ref$total_pages = _ref.total_pages,
10218
+ total_pages = _ref$total_pages === void 0 ? 1 : _ref$total_pages,
10219
+ _ref$current_page = _ref.current_page,
10220
+ current_page = _ref$current_page === void 0 ? 1 : _ref$current_page,
10221
+ _ref$onPageChange = _ref.onPageChange,
10222
+ onPageChange = _ref$onPageChange === void 0 ? function () {} : _ref$onPageChange;
10222
10223
  var handlePageChange = function handlePageChange(page) {
10223
- onPageChange(page);
10224
+ if (page >= 0 && page <= total_pages - 1) {
10225
+ onPageChange(page);
10226
+ }
10227
+ };
10228
+ var generatePageNumbers = function generatePageNumbers() {
10229
+ if (total_pages <= 5) {
10230
+ return Array.from({
10231
+ length: total_pages
10232
+ }, function (_, i) {
10233
+ return i + 1;
10234
+ });
10235
+ }
10236
+ var pages = [1];
10237
+ if (current_page > 3) pages.push("...");
10238
+ var start = Math.max(2, current_page - 1);
10239
+ var end = Math.min(total_pages - 1, current_page + 2);
10240
+ for (var i = start; i <= end; i++) {
10241
+ pages.push(i);
10242
+ }
10243
+ if (current_page < total_pages - 2) pages.push("...");
10244
+ pages.push(total_pages);
10245
+ return pages;
10224
10246
  };
10225
10247
  return /*#__PURE__*/React__default.createElement("div", {
10226
- className: "flex gap-4 items-center justify-self-center " + className
10248
+ className: "flex gap-4 justify-center items-center " + className
10227
10249
  }, /*#__PURE__*/React__default.createElement(io5.IoChevronBackOutline, {
10228
- className: has_previous ? "text-primary cursor-pointer" : "text-gray3",
10250
+ className: current_page > 0 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10229
10251
  size: size,
10230
10252
  onClick: function onClick() {
10231
- if (has_previous) handlePageChange(current_page - 1);
10253
+ return handlePageChange(current_page - 1);
10232
10254
  }
10233
10255
  }), /*#__PURE__*/React__default.createElement("div", {
10234
10256
  className: "flex items-center space-x-1"
10235
- }, Array(total_pages).fill().map(function (_, index) {
10257
+ }, generatePageNumbers().map(function (page, index) {
10236
10258
  return /*#__PURE__*/React__default.createElement("button", {
10237
10259
  key: index,
10238
10260
  onClick: function onClick() {
10239
- return handlePageChange(index);
10261
+ return typeof page === "number" && handlePageChange(page - 1);
10240
10262
  },
10241
- className: "px-4 py-1 rounded-md " + (index === current_page ? 'bg-primary text-textButton' : 'bg-transparent text-primary') + " hover:opacity-80"
10242
- }, index + 1);
10263
+ 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" : ""),
10264
+ disabled: page === "..."
10265
+ }, page);
10243
10266
  })), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
10244
- className: has_next ? "text-primary cursor-pointer" : "text-gray3",
10267
+ className: current_page < total_pages - 1 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10245
10268
  size: size,
10246
10269
  onClick: function onClick() {
10247
- if (has_next) handlePageChange(current_page + 1);
10270
+ return handlePageChange(current_page + 1);
10248
10271
  }
10249
10272
  }));
10250
10273
  };
@@ -10268,11 +10291,9 @@ var Products3 = function Products3(props) {
10268
10291
  }),
10269
10292
  productParams = _useState[0],
10270
10293
  setProductParams = _useState[1];
10271
- var _useState2 = React.useState(false),
10272
- setIsAutoGetList = _useState2[1];
10273
- var _useState3 = React.useState(),
10274
- categorySelected = _useState3[0],
10275
- setCategorySelected = _useState3[1];
10294
+ var _useState2 = React.useState(),
10295
+ categorySelected = _useState2[0],
10296
+ setCategorySelected = _useState2[1];
10276
10297
  var _ProductController = ProductController(_extends({}, props, {
10277
10298
  params: productParams
10278
10299
  })),
@@ -10286,16 +10307,12 @@ var Products3 = function Products3(props) {
10286
10307
  }
10287
10308
  })),
10288
10309
  categories = _CategoryController.categories;
10289
- React.useEffect(function () {
10290
- setCategorySelected(categories === null || categories === void 0 ? void 0 : categories[0]);
10291
- }, [categories]);
10292
10310
  React.useEffect(function () {
10293
10311
  if (categorySelected) {
10294
10312
  setProductParams(_extends({}, productParams, {
10295
10313
  page: 0,
10296
10314
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
10297
10315
  }));
10298
- setIsAutoGetList(true);
10299
10316
  }
10300
10317
  }, [categorySelected]);
10301
10318
  var onSelectCategory = function onSelectCategory(category) {
@@ -10319,7 +10336,16 @@ var Products3 = function Products3(props) {
10319
10336
  className: "text-xl"
10320
10337
  }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
10321
10338
  className: "overflow-y-auto max-h-96"
10322
- }, categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10339
+ }, /*#__PURE__*/React__default.createElement("div", {
10340
+ 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"),
10341
+ onClick: function onClick() {
10342
+ return onSelectCategory({
10343
+ categoryId: undefined
10344
+ });
10345
+ }
10346
+ }, /*#__PURE__*/React__default.createElement(io.IoIosHeartEmpty, {
10347
+ size: 24
10348
+ }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10323
10349
  return /*#__PURE__*/React__default.createElement("div", {
10324
10350
  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"),
10325
10351
  key: index,
@@ -10334,7 +10360,7 @@ var Products3 = function Products3(props) {
10334
10360
  }), /*#__PURE__*/React__default.createElement("div", {
10335
10361
  className: "col-span-3 text-center"
10336
10362
  }, loading ? /*#__PURE__*/React__default.createElement("div", {
10337
- className: "flex w-full justify-center p-12"
10363
+ className: "flex w-full justify-center items-center p-12 h-[700px]"
10338
10364
  }, /*#__PURE__*/React__default.createElement(Loading, {
10339
10365
  size: 32
10340
10366
  })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
@@ -10560,10 +10586,8 @@ var Products11 = function Products11(props) {
10560
10586
  }
10561
10587
  }, [categories]);
10562
10588
  React.useEffect(function () {
10563
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
10564
- setProductsFilter(products);
10565
- }
10566
- }, [products]);
10589
+ setProductsFilter(products);
10590
+ }, [products, categorySelected]);
10567
10591
  var handleFilter = function handleFilter(item) {
10568
10592
  setFilterItem(item);
10569
10593
  if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
@@ -10580,14 +10604,18 @@ var Products11 = function Products11(props) {
10580
10604
  });
10581
10605
  setProductsFilter(_productsCopy);
10582
10606
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10583
- var _productsCopy3;
10584
- var _productsCopy2 = [].concat(products);
10585
- _productsCopy2 = (_productsCopy3 = _productsCopy2) === null || _productsCopy3 === void 0 ? void 0 : _productsCopy3.filter(function (product) {
10586
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10607
+ setParams(function (prev) {
10608
+ return _extends({}, prev, {
10609
+ isHighlight: true
10610
+ });
10587
10611
  });
10588
- setProductsFilter(_productsCopy2);
10589
10612
  } else {
10590
- setProductsFilter(products);
10613
+ setParams(function (prev) {
10614
+ return _extends({}, prev, {
10615
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10616
+ size: 12
10617
+ });
10618
+ });
10591
10619
  }
10592
10620
  };
10593
10621
  return /*#__PURE__*/React__default.createElement("div", {
@@ -10595,7 +10623,7 @@ var Products11 = function Products11(props) {
10595
10623
  }, /*#__PURE__*/React__default.createElement("div", {
10596
10624
  className: "md:sticky top-0 self-start"
10597
10625
  }, /*#__PURE__*/React__default.createElement("div", {
10598
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4"
10626
+ className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10599
10627
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10600
10628
  return /*#__PURE__*/React__default.createElement("div", {
10601
10629
  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" : ""),
@@ -10778,19 +10806,24 @@ var ProductSearch1 = function ProductSearch1(props) {
10778
10806
  setProductsFilter = _useState[1];
10779
10807
  var _useState2 = React.useState({
10780
10808
  productName: keywordValue,
10781
- size: 20
10809
+ size: 12
10782
10810
  }),
10783
10811
  params = _useState2[0],
10784
10812
  setParams = _useState2[1];
10785
10813
  var _useState3 = React.useState(true),
10786
10814
  isGetMore = _useState3[0],
10787
10815
  setIsGetMore = _useState3[1];
10816
+ var _useState4 = React.useState(false),
10817
+ isAutoGetList = _useState4[0],
10818
+ setIsAutoGetList = _useState4[1];
10788
10819
  var _ProductController = ProductController(_extends({}, props, {
10789
- params: params
10820
+ params: params,
10821
+ isAutoGetList: isAutoGetList
10790
10822
  })),
10791
10823
  products = _ProductController.products,
10792
10824
  loading = _ProductController.loading;
10793
10825
  React.useEffect(function () {
10826
+ setIsAutoGetList(true);
10794
10827
  setParams(function (prev) {
10795
10828
  return _extends({}, prev, {
10796
10829
  productName: keywordValue
@@ -10816,14 +10849,16 @@ var ProductSearch1 = function ProductSearch1(props) {
10816
10849
  });
10817
10850
  setProductsFilter(productsCopy);
10818
10851
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10819
- var _productsCopy2;
10820
- var _productsCopy = [].concat(products);
10821
- _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
10822
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10852
+ setParams(function (prev) {
10853
+ return _extends({}, prev, {
10854
+ isHighlight: true
10855
+ });
10823
10856
  });
10824
- setProductsFilter(_productsCopy);
10825
10857
  } else {
10826
- setProductsFilter(products);
10858
+ setParams({
10859
+ size: 12,
10860
+ productName: keywordValue
10861
+ });
10827
10862
  }
10828
10863
  };
10829
10864
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13746,7 +13781,11 @@ var SearchBar2 = function SearchBar2(props) {
13746
13781
  var _useState2 = React.useState(""),
13747
13782
  valueSearch = _useState2[0],
13748
13783
  setSearchValue = _useState2[1];
13749
- var _ProductController = ProductController(_extends({}, props)),
13784
+ var _useState3 = React.useState(false),
13785
+ isAutoGetList = _useState3[0];
13786
+ var _ProductController = ProductController(_extends({}, props, {
13787
+ isAutoGetList: isAutoGetList
13788
+ })),
13750
13789
  getProductListSearch = _ProductController.getProductListSearch;
13751
13790
  React.useEffect(function () {
13752
13791
  if (valueSearch === "") {
@@ -13791,7 +13830,7 @@ var SearchBar2 = function SearchBar2(props) {
13791
13830
  backgroundSize: "cover"
13792
13831
  }
13793
13832
  }, /*#__PURE__*/React__default.createElement("div", {
13794
- className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
13833
+ 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"
13795
13834
  }, /*#__PURE__*/React__default.createElement(Input, {
13796
13835
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
13797
13836
  className: "text-gray3"
@@ -13819,9 +13858,7 @@ var SearchBar2 = function SearchBar2(props) {
13819
13858
  }, 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, {
13820
13859
  product: item === null || item === void 0 ? void 0 : item.productInfo
13821
13860
  })));
13822
- })) : /*#__PURE__*/React__default.createElement("div", {
13823
- className: "mx-auto"
13824
- }, data === null || data === void 0 ? void 0 : data.sectionDescription))));
13861
+ })) : null)));
13825
13862
  };
13826
13863
 
13827
13864
  var SearchBar5 = function SearchBar5(props) {
@@ -13942,8 +13979,9 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13942
13979
  Link = _props$Link === void 0 ? null : _props$Link;
13943
13980
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13944
13981
  return /*#__PURE__*/React__default.createElement("div", {
13945
- 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"
13982
+ 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"
13946
13983
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
13984
+ var _item$title;
13947
13985
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13948
13986
  Link: Link,
13949
13987
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
@@ -13961,7 +13999,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13961
13999
  className: "w-16 h-16 p-3 rounded-full bg-primary"
13962
14000
  }), /*#__PURE__*/React__default.createElement("div", {
13963
14001
  className: "font-medium text-lg"
13964
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
14002
+ }, 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", {
13965
14003
  className: "flex-grow text-gray3 leading-relaxed"
13966
14004
  }, item === null || item === void 0 ? void 0 : item.description)));
13967
14005
  }));
@@ -13975,6 +14013,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13975
14013
  return /*#__PURE__*/React__default.createElement("div", {
13976
14014
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
13977
14015
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
14016
+ var _item$title;
13978
14017
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13979
14018
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13980
14019
  Link: Link
@@ -13991,8 +14030,8 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13991
14030
  alt: "logo",
13992
14031
  className: "w-16 h-16 rounded-full bg-primary"
13993
14032
  }), /*#__PURE__*/React__default.createElement("div", {
13994
- className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
13995
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
14033
+ className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
14034
+ }, 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", {
13996
14035
  className: "flex-grow leading-relaxed"
13997
14036
  }, item === null || item === void 0 ? void 0 : item.description)));
13998
14037
  }));