s-platform-landing-section 0.1.10-alpha.3 → 0.1.10-alpha.5

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.
@@ -52,14 +52,29 @@ var NavBar7 = function NavBar7(props) {
52
52
  _props$userInfo = props.userInfo,
53
53
  userInfo = _props$userInfo === void 0 ? null : _props$userInfo,
54
54
  _props$cartItems = props.cartItems,
55
- cartItems = _props$cartItems === void 0 ? [] : _props$cartItems;
56
- console.log("cartItems", cartItems);
57
- var totalItem = cartItems.reduce(function (total, item) {
58
- return total + item.quantity;
59
- }, 0);
60
- if (totalItem > 9) {
61
- totalItem = "9+";
62
- }
55
+ cartItems = _props$cartItems === void 0 ? [] : _props$cartItems,
56
+ _props$useSelector = props.useSelector,
57
+ useSelector = _props$useSelector === void 0 ? null : _props$useSelector;
58
+ var _useState2 = useState(""),
59
+ totalItem = _useState2[0],
60
+ setTotalItem = _useState2[1];
61
+ useEffect(function () {
62
+ console.log("NavBar7 cartItems", cartItems);
63
+ var totalItem = cartItems.reduce(function (total, item) {
64
+ return total + item.quantity;
65
+ }, 0);
66
+ if (totalItem > 9) {
67
+ totalItem = "9+";
68
+ }
69
+ setTotalItem(totalItem);
70
+ }, [cartItems]);
71
+ var cartItems2 = useSelector === null || useSelector === void 0 ? void 0 : useSelector(function (state) {
72
+ return state.cart.items;
73
+ });
74
+ console.log("NavBar7 cartItems2", cartItems2);
75
+ useEffect(function () {
76
+ console.log("NavBar7 cartItems2", cartItems2);
77
+ }, [cartItems2]);
63
78
  var cart = function cart() {
64
79
  return /*#__PURE__*/React__default.createElement("a", {
65
80
  href: "/carts"
@@ -9575,7 +9590,7 @@ var Footer7 = function Footer7(props) {
9575
9590
  }, /*#__PURE__*/React__default.createElement("div", {
9576
9591
  className: " col-span-2 flex flex-col leading-8 mb-10 sm:mb-0 "
9577
9592
  }, /*#__PURE__*/React__default.createElement("div", {
9578
- className: "mb-3 font-semibold text-md md:text-lg"
9593
+ className: "mb-4 font-semibold text-md md:text-lg"
9579
9594
  }, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
9580
9595
  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", {
9581
9596
  className: "flex gap-1"
@@ -9595,7 +9610,7 @@ var Footer7 = function Footer7(props) {
9595
9610
  }
9596
9611
  }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.phone)));
9597
9612
  })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9598
- className: "mb-4 font-semibold text-lg"
9613
+ className: "mb-4 font-semibold text-md md:text-lg"
9599
9614
  }, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
9600
9615
  className: "leading-10 flex flex-col "
9601
9616
  }, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
@@ -9605,7 +9620,7 @@ var Footer7 = function Footer7(props) {
9605
9620
  href: route === null || route === void 0 ? void 0 : route.route
9606
9621
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
9607
9622
  }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9608
- className: "font-semibold mb-4 text-lg"
9623
+ className: "font-semibold mb-4 text-md md:text-lg"
9609
9624
  }, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
9610
9625
  className: "flex justify-start items-center gap-4"
9611
9626
  }, /*#__PURE__*/React__default.createElement("a", {