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

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.
@@ -7672,8 +7672,8 @@ var Hero13 = function Hero13(props) {
7672
7672
  }, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
7673
7673
  size: 32
7674
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"
7675
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7676
+ target: "_blank"
7677
7677
  }, /*#__PURE__*/React__default.createElement("div", {
7678
7678
  className: "relative w-max"
7679
7679
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7933,11 +7933,6 @@ var ProductController = function ProductController(props) {
7933
7933
  var _res$data2, _res$data3;
7934
7934
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7935
7935
  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
7936
  }
7942
7937
  setLoading(false);
7943
7938
  });
@@ -10057,13 +10052,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10057
10052
  product: product,
10058
10053
  className: "w-full aspect-square !object-contain rounded-2xl"
10059
10054
  })), /*#__PURE__*/React__default.createElement("div", {
10060
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10055
+ 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
10056
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10062
10057
  return /*#__PURE__*/React__default.createElement("img", {
10063
10058
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10064
10059
  key: item === null || item === void 0 ? void 0 : item.imageId,
10065
10060
  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"),
10061
+ 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
10062
  onClick: function onClick() {
10068
10063
  handleDisplayImage(item);
10069
10064
  }
@@ -10184,7 +10179,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10184
10179
  }, /*#__PURE__*/React__default.createElement("div", {
10185
10180
  className: "flex flex-col gap-4 col-span-2"
10186
10181
  }, /*#__PURE__*/React__default.createElement("div", {
10187
- className: "rounded-2xl p-2 bg-background border"
10182
+ className: "rounded-2xl bg-background border"
10188
10183
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10189
10184
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10190
10185
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10192,13 +10187,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10192
10187
  product: product,
10193
10188
  className: "w-full aspect-square !object-contain rounded-2xl"
10194
10189
  })), /*#__PURE__*/React__default.createElement("div", {
10195
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10190
+ 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
10191
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10197
10192
  return /*#__PURE__*/React__default.createElement("img", {
10198
10193
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10199
10194
  key: item === null || item === void 0 ? void 0 : item.imageId,
10200
10195
  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"),
10196
+ 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
10197
  onClick: function onClick() {
10203
10198
  handleDisplayImage(item);
10204
10199
  }
@@ -10320,7 +10315,7 @@ var ProductItem3 = function ProductItem3(props) {
10320
10315
  className: "w-full border border-stroke rounded-2xl " + className
10321
10316
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10322
10317
  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"
10318
+ className: "w-full rounded-t-2xl"
10324
10319
  }), /*#__PURE__*/React__default.createElement("div", {
10325
10320
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10326
10321
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10347,7 +10342,7 @@ var ProductItem4 = function ProductItem4(props) {
10347
10342
  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
10343
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10349
10344
  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"
10345
+ className: "w-full rounded-2xl"
10351
10346
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10352
10347
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10353
10348
  }, 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 +10377,7 @@ var ProductItem5 = function ProductItem5(props) {
10382
10377
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10383
10378
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10384
10379
  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"
10380
+ className: "w-full rounded-2xl"
10386
10381
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10387
10382
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10388
10383
  }, 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 +10410,7 @@ var ProductItem6 = function ProductItem6(props) {
10415
10410
  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
10411
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10417
10412
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10418
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10413
+ className: "w-full !aspect-[3/4] rounded-2xl"
10419
10414
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10420
10415
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10421
10416
  }, 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 +10445,7 @@ var ProductItem7 = function ProductItem7(props) {
10450
10445
  className: "px-2 md:px-4 xl:px-6"
10451
10446
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10452
10447
  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"
10448
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10454
10449
  })), (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
10450
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10456
10451
  }, "-", 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 +10478,7 @@ var ProductItem8 = function ProductItem8(props) {
10483
10478
  className: "relative "
10484
10479
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10485
10480
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10486
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10481
+ className: "!aspect-[5/8] rounded"
10487
10482
  }), /*#__PURE__*/React__default.createElement("div", {
10488
10483
  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
10484
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10516,7 +10511,7 @@ var ProductItem9 = function ProductItem9(props) {
10516
10511
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10517
10512
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10518
10513
  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"
10514
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10520
10515
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10521
10516
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10522
10517
  }, 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 +10643,7 @@ var ProductItem11 = function ProductItem11(props) {
10648
10643
  className: "overflow-hidden"
10649
10644
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10650
10645
  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]"
10646
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10652
10647
  })), /*#__PURE__*/React__default.createElement("div", {
10653
10648
  className: "p-4 flex flex-col gap-4"
10654
10649
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10682,7 +10677,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10682
10677
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10683
10678
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10684
10679
  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"
10680
+ className: " rounded-2xl"
10686
10681
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10687
10682
  className: "line-clamp-1 mb-2 font-medium text-lg"
10688
10683
  }, 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, {
@@ -11377,7 +11372,7 @@ var Products11 = function Products11(props) {
11377
11372
  _props$Link = props.Link,
11378
11373
  Link = _props$Link === void 0 ? null : _props$Link,
11379
11374
  _props$categoryId = props.categoryId,
11380
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11375
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11381
11376
  _props$ProductItem = props.ProductItem,
11382
11377
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11383
11378
  var _useState = useState({
@@ -11420,13 +11415,18 @@ var Products11 = function Products11(props) {
11420
11415
  });
11421
11416
  };
11422
11417
  var handleChooseCategory = function handleChooseCategory(category) {
11418
+ if (categoryId) {
11419
+ var newUrl = getLinkProductsByCategory(category);
11420
+ window.history.replaceState(null, '', newUrl);
11421
+ }
11423
11422
  setCategorySelected(category);
11424
11423
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11425
11424
  setParams(function (prev) {
11426
- return _extends({}, prev, {
11425
+ return {
11426
+ page: 0,
11427
11427
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11428
11428
  size: 12
11429
- });
11429
+ };
11430
11430
  });
11431
11431
  window.scrollTo({
11432
11432
  top: 0,
@@ -11499,7 +11499,7 @@ var Products11 = function Products11(props) {
11499
11499
  }, /*#__PURE__*/React__default.createElement("div", {
11500
11500
  className: "md:sticky top-16 self-start"
11501
11501
  }, (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"
11502
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11503
11503
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11504
11504
  return /*#__PURE__*/React__default.createElement("div", {
11505
11505
  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 +12278,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12278
12278
  return /*#__PURE__*/React__default.createElement("div", {
12279
12279
  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
12280
  }, /*#__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"
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 gap-3 md:gap-6 bg-bgSecondary"
12282
12282
  }, /*#__PURE__*/React__default.createElement("div", {
12283
- className: "flex flex-col gap-4 col-span-2 "
12283
+ className: "flex flex-col gap-4 md:col-span-2 "
12284
12284
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12285
12285
  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 "
12286
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12287
12287
  }) : /*#__PURE__*/React__default.createElement("div", {
12288
12288
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12289
12289
  style: {
@@ -12294,19 +12294,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12294
12294
  height: "25%",
12295
12295
  fill: "#D9D9D9"
12296
12296
  })), /*#__PURE__*/React__default.createElement("div", {
12297
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12297
+ 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
12298
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12299
12299
  return /*#__PURE__*/React__default.createElement("img", {
12300
12300
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12301
12301
  key: item === null || item === void 0 ? void 0 : item.imageId,
12302
12302
  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 "),
12303
+ 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
12304
  onClick: function onClick() {
12305
12305
  handleDisplayImage(item);
12306
12306
  }
12307
12307
  });
12308
12308
  }))), /*#__PURE__*/React__default.createElement("div", {
12309
- className: "col-span-3"
12309
+ className: "md:col-span-3 "
12310
12310
  }, /*#__PURE__*/React__default.createElement("p", {
12311
12311
  className: "font-semibold text-2xl"
12312
12312
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12320,7 +12320,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12320
12320
  }, /*#__PURE__*/React__default.createElement("div", {
12321
12321
  className: "min-w-24"
12322
12322
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12323
- className: "flex gap-2"
12323
+ className: "flex flex-wrap gap-2"
12324
12324
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12325
12325
  return /*#__PURE__*/React__default.createElement("button", {
12326
12326
  key: i,
@@ -12372,7 +12372,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12372
12372
  __html: product === null || product === void 0 ? void 0 : product.description
12373
12373
  }
12374
12374
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12375
- className: "h-10 relative -mt-10 rounded-b-lg",
12375
+ className: "h-28 relative -mt-28 rounded-b-lg",
12376
12376
  style: {
12377
12377
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12378
12378
  }
@@ -12517,7 +12517,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12517
12517
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12518
12518
  key: item === null || item === void 0 ? void 0 : item.imageId,
12519
12519
  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" : ""),
12520
+ 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
12521
  onClick: function onClick() {
12522
12522
  handleDisplayImage(item);
12523
12523
  }
@@ -12549,7 +12549,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12549
12549
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12550
12550
  key: item === null || item === void 0 ? void 0 : item.imageId,
12551
12551
  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" : ""),
12552
+ 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
12553
  onClick: function onClick() {
12554
12554
  handleDisplayImage(item);
12555
12555
  }
@@ -12569,7 +12569,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12569
12569
  }, /*#__PURE__*/React__default.createElement("div", {
12570
12570
  className: "min-w-24 my-auto"
12571
12571
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12572
- className: "flex gap-2"
12572
+ className: "flex flex-wrap gap-2"
12573
12573
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12574
12574
  return /*#__PURE__*/React__default.createElement("button", {
12575
12575
  key: i,
@@ -14258,21 +14258,21 @@ var Gallery2 = function Gallery2(props) {
14258
14258
  }, 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
14259
  return /*#__PURE__*/React__default.createElement("img", {
14260
14260
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14261
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14261
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14262
14262
  });
14263
14263
  })), /*#__PURE__*/React__default.createElement("div", {
14264
14264
  className: "flex flex-col gap-2 md:gap-4"
14265
14265
  }, 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
14266
  return /*#__PURE__*/React__default.createElement("img", {
14267
14267
  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%]"
14268
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14269
14269
  });
14270
14270
  })), /*#__PURE__*/React__default.createElement("div", {
14271
14271
  className: "flex flex-col gap-2 md:gap-4"
14272
14272
  }, 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
14273
  return /*#__PURE__*/React__default.createElement("img", {
14274
14274
  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%]"
14275
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14276
14276
  });
14277
14277
  })))));
14278
14278
  };
@@ -15958,11 +15958,6 @@ var NewsController = function NewsController(props) {
15958
15958
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15959
15959
  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
15960
  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
15961
  }
15967
15962
  setLoading(false);
15968
15963
  });
@@ -16196,7 +16191,8 @@ var News1 = function News1(props) {
16196
16191
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16197
16192
  _props$Link = props.Link,
16198
16193
  Link = _props$Link === void 0 ? null : _props$Link,
16199
- catId = props.catId;
16194
+ _props$catId = props.catId,
16195
+ catId = _props$catId === void 0 ? "" : _props$catId;
16200
16196
  var _useState = useState({
16201
16197
  page: 0,
16202
16198
  sort: "timeUpdate,DESC",
@@ -16236,6 +16232,18 @@ var News1 = function News1(props) {
16236
16232
  setCategorySelected(category);
16237
16233
  }
16238
16234
  }, [newsCategories]);
16235
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16236
+ if (catId) {
16237
+ var newUrl = getLinkNewsByCategory(item);
16238
+ window.history.replaceState(null, '', newUrl);
16239
+ }
16240
+ setCategorySelected(item);
16241
+ setParams(function (prev) {
16242
+ return _extends({}, prev, {
16243
+ catId: item === null || item === void 0 ? void 0 : item.catId
16244
+ });
16245
+ });
16246
+ };
16239
16247
  return /*#__PURE__*/React__default.createElement("div", {
16240
16248
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16241
16249
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16256,12 +16264,7 @@ var News1 = function News1(props) {
16256
16264
  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
16265
  key: "sdjfdh-" + index,
16258
16266
  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
- });
16267
+ handleSelectedCateogry(item);
16265
16268
  }
16266
16269
  }, /*#__PURE__*/React__default.createElement("div", {
16267
16270
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16315,12 +16318,7 @@ var News1 = function News1(props) {
16315
16318
  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
16319
  key: "sdjfdh-" + index,
16317
16320
  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
- });
16321
+ handleSelectedCateogry(item);
16324
16322
  }
16325
16323
  }, /*#__PURE__*/React__default.createElement("div", {
16326
16324
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")