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