s-platform-landing-section 0.1.36-beta.1 → 0.1.36-beta.3

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.
@@ -7638,20 +7638,17 @@ var CategoryController = function CategoryController(props) {
7638
7638
 
7639
7639
  var Hero13 = function Hero13(props) {
7640
7640
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7641
- var listRef = useRef(null);
7642
- var _useState = useState(false);
7643
7641
  var shopConfig = props.shopConfig,
7644
7642
  data = props.data;
7645
7643
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7646
- var _CategoryController = CategoryController(props);
7647
7644
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7648
7645
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7649
7646
  alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
7650
7647
  className: "w-full object-cover"
7651
7648
  }), /*#__PURE__*/React__default.createElement("div", {
7652
7649
  className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7653
- }, /*#__PURE__*/React__default.createElement("a", {
7654
- href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7650
+ }, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
7651
+ href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
7655
7652
  }, /*#__PURE__*/React__default.createElement("div", {
7656
7653
  className: "relative w-max"
7657
7654
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7660,9 +7657,9 @@ var Hero13 = function Hero13(props) {
7660
7657
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7661
7658
  }, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
7662
7659
  size: 36
7663
- })))), /*#__PURE__*/React__default.createElement("a", {
7660
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
7664
7661
  href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7665
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7662
+ target: "_blank"
7666
7663
  }, /*#__PURE__*/React__default.createElement("div", {
7667
7664
  className: "relative w-max"
7668
7665
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7671,9 +7668,9 @@ var Hero13 = function Hero13(props) {
7671
7668
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7672
7669
  }, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
7673
7670
  size: 32
7674
- })))), /*#__PURE__*/React__default.createElement("a", {
7675
- href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7676
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7671
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
7672
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7673
+ target: "_blank"
7677
7674
  }, /*#__PURE__*/React__default.createElement("div", {
7678
7675
  className: "relative w-max"
7679
7676
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7933,11 +7930,6 @@ var ProductController = function ProductController(props) {
7933
7930
  var _res$data2, _res$data3;
7934
7931
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7935
7932
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7936
- var url = new URL(window.location.href);
7937
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7938
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7939
- window.history.replaceState({}, '', url.pathname + url.search);
7940
- }
7941
7933
  }
7942
7934
  setLoading(false);
7943
7935
  });
@@ -10057,13 +10049,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10057
10049
  product: product,
10058
10050
  className: "w-full aspect-square !object-contain rounded-2xl"
10059
10051
  })), /*#__PURE__*/React__default.createElement("div", {
10060
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10052
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10061
10053
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10062
10054
  return /*#__PURE__*/React__default.createElement("img", {
10063
10055
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10064
10056
  key: item === null || item === void 0 ? void 0 : item.imageId,
10065
10057
  alt: "",
10066
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10058
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10067
10059
  onClick: function onClick() {
10068
10060
  handleDisplayImage(item);
10069
10061
  }
@@ -10184,7 +10176,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10184
10176
  }, /*#__PURE__*/React__default.createElement("div", {
10185
10177
  className: "flex flex-col gap-4 col-span-2"
10186
10178
  }, /*#__PURE__*/React__default.createElement("div", {
10187
- className: "rounded-2xl p-2 bg-background border"
10179
+ className: "rounded-2xl bg-background border"
10188
10180
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10189
10181
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10190
10182
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10192,13 +10184,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10192
10184
  product: product,
10193
10185
  className: "w-full aspect-square !object-contain rounded-2xl"
10194
10186
  })), /*#__PURE__*/React__default.createElement("div", {
10195
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10187
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10196
10188
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10197
10189
  return /*#__PURE__*/React__default.createElement("img", {
10198
10190
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10199
10191
  key: item === null || item === void 0 ? void 0 : item.imageId,
10200
10192
  alt: "",
10201
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10193
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10202
10194
  onClick: function onClick() {
10203
10195
  handleDisplayImage(item);
10204
10196
  }
@@ -10320,7 +10312,7 @@ var ProductItem3 = function ProductItem3(props) {
10320
10312
  className: "w-full border border-stroke rounded-2xl " + className
10321
10313
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10322
10314
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10323
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10315
+ className: "w-full rounded-t-2xl"
10324
10316
  }), /*#__PURE__*/React__default.createElement("div", {
10325
10317
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10326
10318
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10347,7 +10339,7 @@ var ProductItem4 = function ProductItem4(props) {
10347
10339
  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
10348
10340
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10349
10341
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10350
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10342
+ className: "w-full rounded-2xl"
10351
10343
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10352
10344
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10353
10345
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10382,7 +10374,7 @@ var ProductItem5 = function ProductItem5(props) {
10382
10374
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10383
10375
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10384
10376
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10385
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10377
+ className: "w-full rounded-2xl"
10386
10378
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10387
10379
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10388
10380
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10415,7 +10407,7 @@ var ProductItem6 = function ProductItem6(props) {
10415
10407
  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
10416
10408
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10417
10409
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10418
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10410
+ className: "w-full !aspect-[3/4] rounded-2xl"
10419
10411
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10420
10412
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10421
10413
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10450,7 +10442,7 @@ var ProductItem7 = function ProductItem7(props) {
10450
10442
  className: "px-2 md:px-4 xl:px-6"
10451
10443
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10452
10444
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10453
- className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10445
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10454
10446
  })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10455
10447
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10456
10448
  }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
@@ -10483,7 +10475,7 @@ var ProductItem8 = function ProductItem8(props) {
10483
10475
  className: "relative "
10484
10476
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10485
10477
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10486
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10478
+ className: "!aspect-[5/8] rounded"
10487
10479
  }), /*#__PURE__*/React__default.createElement("div", {
10488
10480
  className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10489
10481
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10516,7 +10508,7 @@ var ProductItem9 = function ProductItem9(props) {
10516
10508
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10517
10509
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10518
10510
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10519
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10511
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10520
10512
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10521
10513
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10522
10514
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10648,7 +10640,7 @@ var ProductItem11 = function ProductItem11(props) {
10648
10640
  className: "overflow-hidden"
10649
10641
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10650
10642
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10651
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10643
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10652
10644
  })), /*#__PURE__*/React__default.createElement("div", {
10653
10645
  className: "p-4 flex flex-col gap-4"
10654
10646
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10669,7 +10661,7 @@ var ProductItem11 = function ProductItem11(props) {
10669
10661
  };
10670
10662
 
10671
10663
  var TreatmentItem1 = function TreatmentItem1(props) {
10672
- var _product$productInfo;
10664
+ var _product$productInfo, _product$productInfo2;
10673
10665
  var product = props.product,
10674
10666
  _props$Link = props.Link,
10675
10667
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10682,7 +10674,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10682
10674
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10683
10675
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10684
10676
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10685
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10677
+ className: " rounded-2xl"
10686
10678
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10687
10679
  className: "line-clamp-1 mb-2 font-medium text-lg"
10688
10680
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10692,7 +10684,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10692
10684
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10693
10685
  }, /*#__PURE__*/React__default.createElement("div", {
10694
10686
  className: "whitespace-nowrap"
10695
- }, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
10687
+ }, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
10696
10688
  shopConfigStyle: shopConfigStyle,
10697
10689
  label: "\u0110\u1EB7t l\u1ECBch",
10698
10690
  className: "w-full"
@@ -11377,7 +11369,7 @@ var Products11 = function Products11(props) {
11377
11369
  _props$Link = props.Link,
11378
11370
  Link = _props$Link === void 0 ? null : _props$Link,
11379
11371
  _props$categoryId = props.categoryId,
11380
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11372
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11381
11373
  _props$ProductItem = props.ProductItem,
11382
11374
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11383
11375
  var _useState = useState({
@@ -11420,13 +11412,18 @@ var Products11 = function Products11(props) {
11420
11412
  });
11421
11413
  };
11422
11414
  var handleChooseCategory = function handleChooseCategory(category) {
11415
+ if (categoryId) {
11416
+ var newUrl = getLinkProductsByCategory(category);
11417
+ window.history.replaceState(null, '', newUrl);
11418
+ }
11423
11419
  setCategorySelected(category);
11424
11420
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11425
11421
  setParams(function (prev) {
11426
- return _extends({}, prev, {
11422
+ return {
11423
+ page: 0,
11427
11424
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11428
11425
  size: 12
11429
- });
11426
+ };
11430
11427
  });
11431
11428
  window.scrollTo({
11432
11429
  top: 0,
@@ -11499,7 +11496,7 @@ var Products11 = function Products11(props) {
11499
11496
  }, /*#__PURE__*/React__default.createElement("div", {
11500
11497
  className: "md:sticky top-16 self-start"
11501
11498
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11502
- className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11499
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11503
11500
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11504
11501
  return /*#__PURE__*/React__default.createElement("div", {
11505
11502
  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" : ""),
@@ -12278,12 +12275,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12278
12275
  return /*#__PURE__*/React__default.createElement("div", {
12279
12276
  className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
12280
12277
  }, /*#__PURE__*/React__default.createElement("div", {
12281
- className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
12278
+ className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
12282
12279
  }, /*#__PURE__*/React__default.createElement("div", {
12283
- className: "flex flex-col gap-4 col-span-2 "
12280
+ className: "flex flex-col gap-4 md:col-span-2 "
12284
12281
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12285
12282
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
12286
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12283
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12287
12284
  }) : /*#__PURE__*/React__default.createElement("div", {
12288
12285
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12289
12286
  style: {
@@ -12294,19 +12291,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12294
12291
  height: "25%",
12295
12292
  fill: "#D9D9D9"
12296
12293
  })), /*#__PURE__*/React__default.createElement("div", {
12297
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12294
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
12298
12295
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12299
12296
  return /*#__PURE__*/React__default.createElement("img", {
12300
12297
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12301
12298
  key: item === null || item === void 0 ? void 0 : item.imageId,
12302
12299
  alt: "",
12303
- className: "cursor-pointer h-16 w-16 rounded-lg bg-background\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12300
+ className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12304
12301
  onClick: function onClick() {
12305
12302
  handleDisplayImage(item);
12306
12303
  }
12307
12304
  });
12308
12305
  }))), /*#__PURE__*/React__default.createElement("div", {
12309
- className: "col-span-3"
12306
+ className: "md:col-span-3 "
12310
12307
  }, /*#__PURE__*/React__default.createElement("p", {
12311
12308
  className: "font-semibold text-2xl"
12312
12309
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12320,7 +12317,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12320
12317
  }, /*#__PURE__*/React__default.createElement("div", {
12321
12318
  className: "min-w-24"
12322
12319
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12323
- className: "flex gap-2"
12320
+ className: "flex flex-wrap gap-2"
12324
12321
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12325
12322
  return /*#__PURE__*/React__default.createElement("button", {
12326
12323
  key: i,
@@ -12372,7 +12369,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12372
12369
  __html: product === null || product === void 0 ? void 0 : product.description
12373
12370
  }
12374
12371
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12375
- className: "h-10 relative -mt-10 rounded-b-lg",
12372
+ className: "h-28 relative -mt-28 rounded-b-lg",
12376
12373
  style: {
12377
12374
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12378
12375
  }
@@ -12517,7 +12514,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12517
12514
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12518
12515
  key: item === null || item === void 0 ? void 0 : item.imageId,
12519
12516
  alt: "",
12520
- className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12517
+ className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12521
12518
  onClick: function onClick() {
12522
12519
  handleDisplayImage(item);
12523
12520
  }
@@ -12549,7 +12546,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12549
12546
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12550
12547
  key: item === null || item === void 0 ? void 0 : item.imageId,
12551
12548
  alt: "",
12552
- className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12549
+ className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12553
12550
  onClick: function onClick() {
12554
12551
  handleDisplayImage(item);
12555
12552
  }
@@ -12569,7 +12566,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12569
12566
  }, /*#__PURE__*/React__default.createElement("div", {
12570
12567
  className: "min-w-24 my-auto"
12571
12568
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12572
- className: "flex gap-2"
12569
+ className: "flex flex-wrap gap-2"
12573
12570
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12574
12571
  return /*#__PURE__*/React__default.createElement("button", {
12575
12572
  key: i,
@@ -14258,21 +14255,21 @@ var Gallery2 = function Gallery2(props) {
14258
14255
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
14259
14256
  return /*#__PURE__*/React__default.createElement("img", {
14260
14257
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14261
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14258
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14262
14259
  });
14263
14260
  })), /*#__PURE__*/React__default.createElement("div", {
14264
14261
  className: "flex flex-col gap-2 md:gap-4"
14265
14262
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
14266
14263
  return /*#__PURE__*/React__default.createElement("img", {
14267
14264
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14268
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14265
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14269
14266
  });
14270
14267
  })), /*#__PURE__*/React__default.createElement("div", {
14271
14268
  className: "flex flex-col gap-2 md:gap-4"
14272
14269
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
14273
14270
  return /*#__PURE__*/React__default.createElement("img", {
14274
14271
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14275
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14272
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14276
14273
  });
14277
14274
  })))));
14278
14275
  };
@@ -15958,11 +15955,6 @@ var NewsController = function NewsController(props) {
15958
15955
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15959
15956
  setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
15960
15957
  setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
15961
- var url = new URL(window.location.href);
15962
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15963
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15964
- window.history.replaceState({}, '', url.pathname + url.search);
15965
- }
15966
15958
  }
15967
15959
  setLoading(false);
15968
15960
  });
@@ -16196,7 +16188,8 @@ var News1 = function News1(props) {
16196
16188
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16197
16189
  _props$Link = props.Link,
16198
16190
  Link = _props$Link === void 0 ? null : _props$Link,
16199
- catId = props.catId;
16191
+ _props$catId = props.catId,
16192
+ catId = _props$catId === void 0 ? "" : _props$catId;
16200
16193
  var _useState = useState({
16201
16194
  page: 0,
16202
16195
  sort: "timeUpdate,DESC",
@@ -16236,6 +16229,18 @@ var News1 = function News1(props) {
16236
16229
  setCategorySelected(category);
16237
16230
  }
16238
16231
  }, [newsCategories]);
16232
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16233
+ if (catId) {
16234
+ var newUrl = getLinkNewsByCategory(item);
16235
+ window.history.replaceState(null, '', newUrl);
16236
+ }
16237
+ setCategorySelected(item);
16238
+ setParams(function (prev) {
16239
+ return _extends({}, prev, {
16240
+ catId: item === null || item === void 0 ? void 0 : item.catId
16241
+ });
16242
+ });
16243
+ };
16239
16244
  return /*#__PURE__*/React__default.createElement("div", {
16240
16245
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16241
16246
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16256,12 +16261,7 @@ var News1 = function News1(props) {
16256
16261
  className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16257
16262
  key: "sdjfdh-" + index,
16258
16263
  onClick: function onClick() {
16259
- setCategorySelected(item);
16260
- setParams(function (prev) {
16261
- return _extends({}, prev, {
16262
- catId: item === null || item === void 0 ? void 0 : item.catId
16263
- });
16264
- });
16264
+ handleSelectedCateogry(item);
16265
16265
  }
16266
16266
  }, /*#__PURE__*/React__default.createElement("div", {
16267
16267
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16315,12 +16315,7 @@ var News1 = function News1(props) {
16315
16315
  className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16316
16316
  key: "sdjfdh-" + index,
16317
16317
  onClick: function onClick() {
16318
- setCategorySelected(item);
16319
- setParams(function (prev) {
16320
- return _extends({}, prev, {
16321
- catId: item === null || item === void 0 ? void 0 : item.catId
16322
- });
16323
- });
16318
+ handleSelectedCateogry(item);
16324
16319
  }
16325
16320
  }, /*#__PURE__*/React__default.createElement("div", {
16326
16321
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16416,7 +16411,7 @@ var NewsDetail1 = function NewsDetail1(props) {
16416
16411
  }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
16417
16412
  className: "top-6 block md:hidden"
16418
16413
  }, /*#__PURE__*/React__default.createElement("div", {
16419
- className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
16414
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
16420
16415
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
16421
16416
  className: "rounded-b-lg bg-bgSecondary"
16422
16417
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {