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.
package/dist/index.js CHANGED
@@ -7675,8 +7675,8 @@ var Hero13 = function Hero13(props) {
7675
7675
  }, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
7676
7676
  size: 32
7677
7677
  })))), /*#__PURE__*/React__default.createElement("a", {
7678
- href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7679
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7678
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7679
+ target: "_blank"
7680
7680
  }, /*#__PURE__*/React__default.createElement("div", {
7681
7681
  className: "relative w-max"
7682
7682
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7936,11 +7936,6 @@ var ProductController = function ProductController(props) {
7936
7936
  var _res$data2, _res$data3;
7937
7937
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7938
7938
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7939
- var url = new URL(window.location.href);
7940
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7941
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7942
- window.history.replaceState({}, '', url.pathname + url.search);
7943
- }
7944
7939
  }
7945
7940
  setLoading(false);
7946
7941
  });
@@ -10060,13 +10055,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10060
10055
  product: product,
10061
10056
  className: "w-full aspect-square !object-contain rounded-2xl"
10062
10057
  })), /*#__PURE__*/React__default.createElement("div", {
10063
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10058
+ 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"
10064
10059
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10065
10060
  return /*#__PURE__*/React__default.createElement("img", {
10066
10061
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10067
10062
  key: item === null || item === void 0 ? void 0 : item.imageId,
10068
10063
  alt: "",
10069
- 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"),
10064
+ 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"),
10070
10065
  onClick: function onClick() {
10071
10066
  handleDisplayImage(item);
10072
10067
  }
@@ -10187,7 +10182,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10187
10182
  }, /*#__PURE__*/React__default.createElement("div", {
10188
10183
  className: "flex flex-col gap-4 col-span-2"
10189
10184
  }, /*#__PURE__*/React__default.createElement("div", {
10190
- className: "rounded-2xl p-2 bg-background border"
10185
+ className: "rounded-2xl bg-background border"
10191
10186
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10192
10187
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10193
10188
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10195,13 +10190,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10195
10190
  product: product,
10196
10191
  className: "w-full aspect-square !object-contain rounded-2xl"
10197
10192
  })), /*#__PURE__*/React__default.createElement("div", {
10198
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10193
+ 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"
10199
10194
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10200
10195
  return /*#__PURE__*/React__default.createElement("img", {
10201
10196
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10202
10197
  key: item === null || item === void 0 ? void 0 : item.imageId,
10203
10198
  alt: "",
10204
- 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"),
10199
+ 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"),
10205
10200
  onClick: function onClick() {
10206
10201
  handleDisplayImage(item);
10207
10202
  }
@@ -10323,7 +10318,7 @@ var ProductItem3 = function ProductItem3(props) {
10323
10318
  className: "w-full border border-stroke rounded-2xl " + className
10324
10319
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10325
10320
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10326
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10321
+ className: "w-full rounded-t-2xl"
10327
10322
  }), /*#__PURE__*/React__default.createElement("div", {
10328
10323
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10329
10324
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10350,7 +10345,7 @@ var ProductItem4 = function ProductItem4(props) {
10350
10345
  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
10351
10346
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10352
10347
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10353
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10348
+ className: "w-full rounded-2xl"
10354
10349
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10355
10350
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10356
10351
  }, 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, {
@@ -10385,7 +10380,7 @@ var ProductItem5 = function ProductItem5(props) {
10385
10380
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10386
10381
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10387
10382
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10388
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10383
+ className: "w-full rounded-2xl"
10389
10384
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10390
10385
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10391
10386
  }, 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, {
@@ -10418,7 +10413,7 @@ var ProductItem6 = function ProductItem6(props) {
10418
10413
  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
10419
10414
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10420
10415
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10421
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10416
+ className: "w-full !aspect-[3/4] rounded-2xl"
10422
10417
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10423
10418
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10424
10419
  }, 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, {
@@ -10453,7 +10448,7 @@ var ProductItem7 = function ProductItem7(props) {
10453
10448
  className: "px-2 md:px-4 xl:px-6"
10454
10449
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10455
10450
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10456
- className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10451
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10457
10452
  })), (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", {
10458
10453
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10459
10454
  }, "-", 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", {
@@ -10486,7 +10481,7 @@ var ProductItem8 = function ProductItem8(props) {
10486
10481
  className: "relative "
10487
10482
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10488
10483
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10489
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10484
+ className: "!aspect-[5/8] rounded"
10490
10485
  }), /*#__PURE__*/React__default.createElement("div", {
10491
10486
  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 "
10492
10487
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10519,7 +10514,7 @@ var ProductItem9 = function ProductItem9(props) {
10519
10514
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10520
10515
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10521
10516
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10522
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10517
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10523
10518
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10524
10519
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10525
10520
  }, 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, {
@@ -10651,7 +10646,7 @@ var ProductItem11 = function ProductItem11(props) {
10651
10646
  className: "overflow-hidden"
10652
10647
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10653
10648
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10654
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10649
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10655
10650
  })), /*#__PURE__*/React__default.createElement("div", {
10656
10651
  className: "p-4 flex flex-col gap-4"
10657
10652
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10685,7 +10680,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10685
10680
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10686
10681
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10687
10682
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10688
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10683
+ className: " rounded-2xl"
10689
10684
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10690
10685
  className: "line-clamp-1 mb-2 font-medium text-lg"
10691
10686
  }, 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, {
@@ -11380,7 +11375,7 @@ var Products11 = function Products11(props) {
11380
11375
  _props$Link = props.Link,
11381
11376
  Link = _props$Link === void 0 ? null : _props$Link,
11382
11377
  _props$categoryId = props.categoryId,
11383
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11378
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11384
11379
  _props$ProductItem = props.ProductItem,
11385
11380
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11386
11381
  var _useState = React.useState({
@@ -11423,13 +11418,18 @@ var Products11 = function Products11(props) {
11423
11418
  });
11424
11419
  };
11425
11420
  var handleChooseCategory = function handleChooseCategory(category) {
11421
+ if (categoryId) {
11422
+ var newUrl = getLinkProductsByCategory(category);
11423
+ window.history.replaceState(null, '', newUrl);
11424
+ }
11426
11425
  setCategorySelected(category);
11427
11426
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11428
11427
  setParams(function (prev) {
11429
- return _extends({}, prev, {
11428
+ return {
11429
+ page: 0,
11430
11430
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11431
11431
  size: 12
11432
- });
11432
+ };
11433
11433
  });
11434
11434
  window.scrollTo({
11435
11435
  top: 0,
@@ -11502,7 +11502,7 @@ var Products11 = function Products11(props) {
11502
11502
  }, /*#__PURE__*/React__default.createElement("div", {
11503
11503
  className: "md:sticky top-16 self-start"
11504
11504
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11505
- className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11505
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11506
11506
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11507
11507
  return /*#__PURE__*/React__default.createElement("div", {
11508
11508
  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" : ""),
@@ -12281,12 +12281,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12281
12281
  return /*#__PURE__*/React__default.createElement("div", {
12282
12282
  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")
12283
12283
  }, /*#__PURE__*/React__default.createElement("div", {
12284
- 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"
12284
+ 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"
12285
12285
  }, /*#__PURE__*/React__default.createElement("div", {
12286
- className: "flex flex-col gap-4 col-span-2 "
12286
+ className: "flex flex-col gap-4 md:col-span-2 "
12287
12287
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12288
12288
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
12289
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12289
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12290
12290
  }) : /*#__PURE__*/React__default.createElement("div", {
12291
12291
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12292
12292
  style: {
@@ -12297,19 +12297,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12297
12297
  height: "25%",
12298
12298
  fill: "#D9D9D9"
12299
12299
  })), /*#__PURE__*/React__default.createElement("div", {
12300
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12300
+ 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"
12301
12301
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12302
12302
  return /*#__PURE__*/React__default.createElement("img", {
12303
12303
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12304
12304
  key: item === null || item === void 0 ? void 0 : item.imageId,
12305
12305
  alt: "",
12306
- 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 "),
12306
+ 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 "),
12307
12307
  onClick: function onClick() {
12308
12308
  handleDisplayImage(item);
12309
12309
  }
12310
12310
  });
12311
12311
  }))), /*#__PURE__*/React__default.createElement("div", {
12312
- className: "col-span-3"
12312
+ className: "md:col-span-3 "
12313
12313
  }, /*#__PURE__*/React__default.createElement("p", {
12314
12314
  className: "font-semibold text-2xl"
12315
12315
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12323,7 +12323,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12323
12323
  }, /*#__PURE__*/React__default.createElement("div", {
12324
12324
  className: "min-w-24"
12325
12325
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12326
- className: "flex gap-2"
12326
+ className: "flex flex-wrap gap-2"
12327
12327
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12328
12328
  return /*#__PURE__*/React__default.createElement("button", {
12329
12329
  key: i,
@@ -12375,7 +12375,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12375
12375
  __html: product === null || product === void 0 ? void 0 : product.description
12376
12376
  }
12377
12377
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12378
- className: "h-10 relative -mt-10 rounded-b-lg",
12378
+ className: "h-28 relative -mt-28 rounded-b-lg",
12379
12379
  style: {
12380
12380
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12381
12381
  }
@@ -12520,7 +12520,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12520
12520
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12521
12521
  key: item === null || item === void 0 ? void 0 : item.imageId,
12522
12522
  alt: "",
12523
- 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" : ""),
12523
+ 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" : ""),
12524
12524
  onClick: function onClick() {
12525
12525
  handleDisplayImage(item);
12526
12526
  }
@@ -12552,7 +12552,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12552
12552
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12553
12553
  key: item === null || item === void 0 ? void 0 : item.imageId,
12554
12554
  alt: "",
12555
- 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" : ""),
12555
+ 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" : ""),
12556
12556
  onClick: function onClick() {
12557
12557
  handleDisplayImage(item);
12558
12558
  }
@@ -12572,7 +12572,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12572
12572
  }, /*#__PURE__*/React__default.createElement("div", {
12573
12573
  className: "min-w-24 my-auto"
12574
12574
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12575
- className: "flex gap-2"
12575
+ className: "flex flex-wrap gap-2"
12576
12576
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12577
12577
  return /*#__PURE__*/React__default.createElement("button", {
12578
12578
  key: i,
@@ -14261,21 +14261,21 @@ var Gallery2 = function Gallery2(props) {
14261
14261
  }, 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) {
14262
14262
  return /*#__PURE__*/React__default.createElement("img", {
14263
14263
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14264
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14264
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14265
14265
  });
14266
14266
  })), /*#__PURE__*/React__default.createElement("div", {
14267
14267
  className: "flex flex-col gap-2 md:gap-4"
14268
14268
  }, 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) {
14269
14269
  return /*#__PURE__*/React__default.createElement("img", {
14270
14270
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14271
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14271
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14272
14272
  });
14273
14273
  })), /*#__PURE__*/React__default.createElement("div", {
14274
14274
  className: "flex flex-col gap-2 md:gap-4"
14275
14275
  }, 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) {
14276
14276
  return /*#__PURE__*/React__default.createElement("img", {
14277
14277
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14278
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14278
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14279
14279
  });
14280
14280
  })))));
14281
14281
  };
@@ -15961,11 +15961,6 @@ var NewsController = function NewsController(props) {
15961
15961
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15962
15962
  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);
15963
15963
  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);
15964
- var url = new URL(window.location.href);
15965
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15966
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15967
- window.history.replaceState({}, '', url.pathname + url.search);
15968
- }
15969
15964
  }
15970
15965
  setLoading(false);
15971
15966
  });
@@ -16199,7 +16194,8 @@ var News1 = function News1(props) {
16199
16194
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16200
16195
  _props$Link = props.Link,
16201
16196
  Link = _props$Link === void 0 ? null : _props$Link,
16202
- catId = props.catId;
16197
+ _props$catId = props.catId,
16198
+ catId = _props$catId === void 0 ? "" : _props$catId;
16203
16199
  var _useState = React.useState({
16204
16200
  page: 0,
16205
16201
  sort: "timeUpdate,DESC",
@@ -16239,6 +16235,18 @@ var News1 = function News1(props) {
16239
16235
  setCategorySelected(category);
16240
16236
  }
16241
16237
  }, [newsCategories]);
16238
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16239
+ if (catId) {
16240
+ var newUrl = getLinkNewsByCategory(item);
16241
+ window.history.replaceState(null, '', newUrl);
16242
+ }
16243
+ setCategorySelected(item);
16244
+ setParams(function (prev) {
16245
+ return _extends({}, prev, {
16246
+ catId: item === null || item === void 0 ? void 0 : item.catId
16247
+ });
16248
+ });
16249
+ };
16242
16250
  return /*#__PURE__*/React__default.createElement("div", {
16243
16251
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16244
16252
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16259,12 +16267,7 @@ var News1 = function News1(props) {
16259
16267
  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" : "") + " ",
16260
16268
  key: "sdjfdh-" + index,
16261
16269
  onClick: function onClick() {
16262
- setCategorySelected(item);
16263
- setParams(function (prev) {
16264
- return _extends({}, prev, {
16265
- catId: item === null || item === void 0 ? void 0 : item.catId
16266
- });
16267
- });
16270
+ handleSelectedCateogry(item);
16268
16271
  }
16269
16272
  }, /*#__PURE__*/React__default.createElement("div", {
16270
16273
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16318,12 +16321,7 @@ var News1 = function News1(props) {
16318
16321
  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" : "") + " ",
16319
16322
  key: "sdjfdh-" + index,
16320
16323
  onClick: function onClick() {
16321
- setCategorySelected(item);
16322
- setParams(function (prev) {
16323
- return _extends({}, prev, {
16324
- catId: item === null || item === void 0 ? void 0 : item.catId
16325
- });
16326
- });
16324
+ handleSelectedCateogry(item);
16327
16325
  }
16328
16326
  }, /*#__PURE__*/React__default.createElement("div", {
16329
16327
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")