@bonlineza/luxity-lib 2.40.4 → 2.40.6

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/LuxityFooter.js CHANGED
@@ -24,6 +24,42 @@
24
24
  return _extends.apply(this, arguments);
25
25
  }
26
26
 
27
+ function _objectWithoutPropertiesLoose(source, excluded) {
28
+ if (source == null) return {};
29
+ var target = {};
30
+ var sourceKeys = Object.keys(source);
31
+ var key, i;
32
+
33
+ for (i = 0; i < sourceKeys.length; i++) {
34
+ key = sourceKeys[i];
35
+ if (excluded.indexOf(key) >= 0) continue;
36
+ target[key] = source[key];
37
+ }
38
+
39
+ return target;
40
+ }
41
+
42
+ function _objectWithoutProperties(source, excluded) {
43
+ if (source == null) return {};
44
+
45
+ var target = _objectWithoutPropertiesLoose(source, excluded);
46
+
47
+ var key, i;
48
+
49
+ if (Object.getOwnPropertySymbols) {
50
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
51
+
52
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
53
+ key = sourceSymbolKeys[i];
54
+ if (excluded.indexOf(key) >= 0) continue;
55
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
56
+ target[key] = source[key];
57
+ }
58
+ }
59
+
60
+ return target;
61
+ }
62
+
27
63
  function _taggedTemplateLiteral(strings, raw) {
28
64
  if (!raw) {
29
65
  raw = strings.slice(0);
@@ -1824,75 +1860,6 @@
1824
1860
  return _formControl.current;
1825
1861
  }
1826
1862
 
1827
- var theme = {
1828
- breakpoints: ['40em', '52em', '64em'],
1829
- space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
1830
- fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
1831
- marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
1832
- letterSpacings: ['-0.5px', '0px', '+0.5px'],
1833
- radii: ['0px', '2px', '4px', '8px'],
1834
- borderRadius: '6px',
1835
- colors: {
1836
- primary: '#000',
1837
- base: '#4e4949',
1838
- baseLt: '#817c7c',
1839
- borderColor: '#d8d8d8',
1840
- ntrlMin: '#fff',
1841
- ntrlMinTen: '#e6e6e6',
1842
- gray: '#efefef',
1843
- darkerGray: '#454141'
1844
- },
1845
- rareStepColors: {
1846
- primary: '#202b58',
1847
- secondary: '#ef5c2d',
1848
- ntrlMin: '#ffffff',
1849
- ntrl40: '#f4f4f4',
1850
- ntrl50: '#808080',
1851
- ntrl60: '#e8e8e8',
1852
- ntrl70: '#252525',
1853
- ntrlMax: '#000000'
1854
- },
1855
- rareStepFontWeights: {
1856
- normal: 400,
1857
- medium: 500,
1858
- semiBold: 600,
1859
- bold: 700
1860
- },
1861
- rareStepFontSize: {
1862
- h1: '36px',
1863
- h2: '30px',
1864
- h3: '24px',
1865
- h4: '20px',
1866
- h5: '16px',
1867
- h6: '14px',
1868
- footerTitle: '16px'
1869
- },
1870
- rareStepPageSizes: {
1871
- mobile: '500px',
1872
- tablet: '768px',
1873
- desktop: '992px',
1874
- screenl: '1280px',
1875
- screenxl: '1680px',
1876
- screenxxl: '1920px',
1877
- container: '1600px'
1878
- }
1879
- };
1880
-
1881
- var themed = (function (Component) {
1882
- return /*#__PURE__*/React.forwardRef(function (props, ref) {
1883
- return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
1884
- theme: theme
1885
- }, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
1886
- ref: ref
1887
- })));
1888
- });
1889
- });
1890
-
1891
- var _templateObject;
1892
- var FooterWrapper = styled__default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n }\n"])), function (props) {
1893
- return props.theme.colors.gray;
1894
- });
1895
-
1896
1863
  var Event = function Event(instance, track) {
1897
1864
  var category = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1898
1865
  var action = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
@@ -1909,26 +1876,35 @@
1909
1876
  }
1910
1877
  };
1911
1878
 
1912
- var GALink = function GALink(props) {
1879
+ var _excluded = ["instance", "track", "label", "onClick", "children"];
1880
+
1881
+ var GALink = function GALink(_ref) {
1882
+ var instance = _ref.instance,
1883
+ track = _ref.track,
1884
+ label = _ref.label,
1885
+ onClick = _ref.onClick,
1886
+ children = _ref.children,
1887
+ rest = _objectWithoutProperties(_ref, _excluded);
1888
+
1913
1889
  var gaOnClick = function gaOnClick(event) {
1914
- Event(props.instance, props.track, 'Link', "Click on ".concat(props.href), props.label);
1890
+ Event(instance, track, 'Link', "Click on ".concat(rest.href), label);
1915
1891
 
1916
- if (typeof props.onClick === 'function') {
1917
- props.onClick(event);
1892
+ if (typeof onClick === 'function') {
1893
+ onClick(event);
1918
1894
  }
1919
1895
  };
1920
1896
 
1921
1897
  return /*#__PURE__*/React__default.createElement("a", _extends({
1922
1898
  href: "/"
1923
- }, props, {
1899
+ }, rest, {
1924
1900
  onClick: gaOnClick
1925
- }), props.children);
1901
+ }), children);
1926
1902
  };
1927
1903
 
1928
- var _templateObject$1, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
1904
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
1929
1905
  /* position relative is required for the Body element to be positioned correctly */
1930
1906
 
1931
- var relativeInlineStyle = styled.css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n position: relative;\n"])));
1907
+ var relativeInlineStyle = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
1932
1908
  var topMiddleBodyStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
1933
1909
  var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
1934
1910
  return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
@@ -1940,7 +1916,7 @@
1940
1916
  return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
1941
1917
  };
1942
1918
 
1943
- var _templateObject$2;
1919
+ var _templateObject$1;
1944
1920
 
1945
1921
  var getBodyStyle = function getBodyStyle() {
1946
1922
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -1975,7 +1951,7 @@
1975
1951
  }
1976
1952
  };
1977
1953
 
1978
- var Body = styled__default.span(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
1954
+ var Body = styled__default.span(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
1979
1955
  return props.$bodyWidth;
1980
1956
  }, function (props) {
1981
1957
  return props.theme.colors.base || 'black';
@@ -1985,8 +1961,72 @@
1985
1961
  return getAfterStyling(props);
1986
1962
  });
1987
1963
 
1988
- var _templateObject$3;
1989
- var Container = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
1964
+ var _templateObject$2;
1965
+ var Container = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
1966
+
1967
+ var theme = {
1968
+ breakpoints: ['40em', '52em', '64em'],
1969
+ space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
1970
+ fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
1971
+ marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
1972
+ letterSpacings: ['-0.5px', '0px', '+0.5px'],
1973
+ radii: ['0px', '2px', '4px', '8px'],
1974
+ borderRadius: '6px',
1975
+ colors: {
1976
+ primary: '#000',
1977
+ base: '#4e4949',
1978
+ baseLt: '#817c7c',
1979
+ borderColor: '#d8d8d8',
1980
+ ntrlMin: '#fff',
1981
+ ntrlMinTen: '#e6e6e6',
1982
+ gray: '#efefef',
1983
+ darkerGray: '#454141'
1984
+ },
1985
+ rareStepColors: {
1986
+ primary: '#202b58',
1987
+ secondary: '#ef5c2d',
1988
+ ntrlMin: '#ffffff',
1989
+ ntrl40: '#f4f4f4',
1990
+ ntrl50: '#808080',
1991
+ ntrl60: '#e8e8e8',
1992
+ ntrl70: '#252525',
1993
+ ntrlMax: '#000000'
1994
+ },
1995
+ rareStepFontWeights: {
1996
+ normal: 400,
1997
+ medium: 500,
1998
+ semiBold: 600,
1999
+ bold: 700
2000
+ },
2001
+ rareStepFontSize: {
2002
+ h1: '36px',
2003
+ h2: '30px',
2004
+ h3: '24px',
2005
+ h4: '20px',
2006
+ h5: '16px',
2007
+ h6: '14px',
2008
+ footerTitle: '16px'
2009
+ },
2010
+ rareStepPageSizes: {
2011
+ mobile: '500px',
2012
+ tablet: '768px',
2013
+ desktop: '992px',
2014
+ screenl: '1280px',
2015
+ screenxl: '1680px',
2016
+ screenxxl: '1920px',
2017
+ container: '1600px'
2018
+ }
2019
+ };
2020
+
2021
+ var themed = (function (Component) {
2022
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
2023
+ return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
2024
+ theme: theme
2025
+ }, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
2026
+ ref: ref
2027
+ })));
2028
+ });
2029
+ });
1990
2030
 
1991
2031
  /* eslint-disable react/require-default-props */
1992
2032
 
@@ -2151,16 +2191,28 @@
2151
2191
  })), /*#__PURE__*/React__default.createElement("div", {
2152
2192
  className: "footer__links"
2153
2193
  }, !!contactLinks.map && contactLinks.map(function (link) {
2154
- return !link.isContact ? /*#__PURE__*/React__default.createElement(GALink, {
2155
- key: link.label,
2156
- instance: link.instance,
2157
- href: link.href,
2158
- label: link.label,
2159
- className: "footer__link",
2160
- rel: "noopener noreferrer",
2161
- track: link === null || link === void 0 ? void 0 : link.track,
2162
- target: link.target
2163
- }, link.label) : /*#__PURE__*/React__default.createElement("div", {
2194
+ if (!link.isContact) {
2195
+ return /*#__PURE__*/React__default.createElement(GALink, {
2196
+ key: link.label,
2197
+ instance: link.instance,
2198
+ href: link.href,
2199
+ label: link.label,
2200
+ className: "footer__link",
2201
+ rel: "noopener noreferrer",
2202
+ track: link === null || link === void 0 ? void 0 : link.track,
2203
+ target: link.target
2204
+ }, link.label);
2205
+ }
2206
+
2207
+ if (link.href) {
2208
+ return /*#__PURE__*/React__default.createElement("a", {
2209
+ key: link.label,
2210
+ href: link.href,
2211
+ className: "footer__text"
2212
+ }, link.label);
2213
+ }
2214
+
2215
+ return /*#__PURE__*/React__default.createElement("div", {
2164
2216
  key: link.label,
2165
2217
  className: "footer__text"
2166
2218
  }, link.label);
@@ -2215,7 +2267,9 @@
2215
2267
  });
2216
2268
  };
2217
2269
 
2218
- return /*#__PURE__*/React__default.createElement(FooterWrapper, null, showNewsletter && /*#__PURE__*/React__default.createElement("div", {
2270
+ return /*#__PURE__*/React__default.createElement("div", {
2271
+ className: "footer__container"
2272
+ }, showNewsletter && /*#__PURE__*/React__default.createElement("div", {
2219
2273
  className: "footer__newsletter-section"
2220
2274
  }, /*#__PURE__*/React__default.createElement("div", {
2221
2275
  className: "footer__newsletter-wrapper"
@@ -2302,8 +2356,6 @@
2302
2356
  }, "Copyright ", currentYear, " | Luxity (Pty) LTD | All Rights Reserved")));
2303
2357
  };
2304
2358
 
2305
- var index = themed(LuxityFooter);
2306
-
2307
- return index;
2359
+ return LuxityFooter;
2308
2360
 
2309
2361
  })));
@@ -1134,9 +1134,30 @@
1134
1134
  return category;
1135
1135
  });
1136
1136
 
1137
- _defineProperty(_assertThisInitialized(_this), "render", function () {
1138
- var _data$min_shoe_size, _data$max_shoe_size;
1137
+ _defineProperty(_assertThisInitialized(_this), "hasSize", function () {
1138
+ var category_type = _this.props.data.category_type;
1139
+ if (category_type === interestCategories.SHOES) return true;
1140
+ if (category_type === interestCategories.APPAREL) return true;
1141
+ return false;
1142
+ });
1139
1143
 
1144
+ _defineProperty(_assertThisInitialized(_this), "getSizeValue", function () {
1145
+ var data = _this.props.data;
1146
+
1147
+ if (data.category_type === interestCategories.SHOES) {
1148
+ var _data$min_shoe_size, _data$max_shoe_size;
1149
+
1150
+ return "".concat((data === null || data === void 0 ? void 0 : (_data$min_shoe_size = data.min_shoe_size) === null || _data$min_shoe_size === void 0 ? void 0 : _data$min_shoe_size.size) || '', " - ").concat((data === null || data === void 0 ? void 0 : (_data$max_shoe_size = data.max_shoe_size) === null || _data$max_shoe_size === void 0 ? void 0 : _data$max_shoe_size.size) || '');
1151
+ }
1152
+
1153
+ var apparelSizes = data.universal_apparel_sizes || [];
1154
+ if (apparelSizes.length === 0) return '-';
1155
+ return apparelSizes.map(function (apparelSize) {
1156
+ return apparelSize.size;
1157
+ }).join(', ');
1158
+ });
1159
+
1160
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
1140
1161
  var data = _this.props.data;
1141
1162
  var success = _this.state.delete.success;
1142
1163
  return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
@@ -1174,10 +1195,10 @@
1174
1195
  key: "".concat(style.name, "-").concat(data.id)
1175
1196
  }, style.name);
1176
1197
  }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
1177
- className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
1178
- }, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React__default.createElement("div", {
1198
+ className: "interest-item__container_heading ".concat(_this.hasSize() ? '' : 'no-shoe-size-section')
1199
+ }, _this.hasSize() ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Size:"), /*#__PURE__*/React__default.createElement("div", {
1179
1200
  className: "list-items"
1180
- }, "".concat((data === null || data === void 0 ? void 0 : (_data$min_shoe_size = data.min_shoe_size) === null || _data$min_shoe_size === void 0 ? void 0 : _data$min_shoe_size.size) || '', " - "), "".concat((data === null || data === void 0 ? void 0 : (_data$max_shoe_size = data.max_shoe_size) === null || _data$max_shoe_size === void 0 ? void 0 : _data$max_shoe_size.size) || '', " "))) : /*#__PURE__*/React__default.createElement(SheoSizeContentDiv, null, "-"))), /*#__PURE__*/React__default.createElement(TrashIcon, {
1201
+ }, _this.getSizeValue())) : /*#__PURE__*/React__default.createElement(SheoSizeContentDiv, null, "-"))), /*#__PURE__*/React__default.createElement(TrashIcon, {
1181
1202
  id: "interest-".concat(data.id, "-delete-button"),
1182
1203
  onClick: function onClick() {
1183
1204
  if (!_this.state.delete.fetching) {
@@ -11103,7 +11124,7 @@
11103
11124
  className: "heading-title"
11104
11125
  }, "Style"), /*#__PURE__*/React__default.createElement("div", {
11105
11126
  className: "heading-title"
11106
- }, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
11127
+ }, "Size")), /*#__PURE__*/React__default.createElement("div", {
11107
11128
  className: "heading-title-empty"
11108
11129
  })));
11109
11130
  };
@@ -12246,16 +12267,11 @@
12246
12267
  var FooterConnectContainer = styled__default.div(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n }\n"])));
12247
12268
 
12248
12269
  var _templateObject$V;
12249
- var FooterWrapper$1 = styled__default.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n }\n"])), function (props) {
12250
- return props.theme.colors.gray;
12251
- });
12252
-
12253
- var _templateObject$W;
12254
12270
  var ALL_ITEM$1 = {
12255
12271
  label: 'ALL',
12256
12272
  value: 'ALL'
12257
12273
  };
12258
- var StyledMultiselector$1 = styled__default.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteral(["\n .multiselector__selected-items,\n .multiselector__selectable-items {\n display: flex;\n flex-flow: no-wrap;\n margin-bottom: 40px;\n .dropdown-select-container {\n width: 100%;\n .dropdown-select {\n &__control {\n border-color: ", ";\n border-radius: 0px;\n background-color: ", ";\n color: ", ";\n }\n &__multi-value {\n background-color: ", ";\n }\n &__multi-value__label {\n color: ", ";\n font-size: 100%;\n }\n &__multi-value__remove {\n svg {\n fill: ", ";\n }\n }\n }\n }\n }\n"])), function (props) {
12274
+ var StyledMultiselector$1 = styled__default.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteral(["\n .multiselector__selected-items,\n .multiselector__selectable-items {\n display: flex;\n flex-flow: no-wrap;\n margin-bottom: 40px;\n .dropdown-select-container {\n width: 100%;\n .dropdown-select {\n &__control {\n border-color: ", ";\n border-radius: 0px;\n background-color: ", ";\n color: ", ";\n }\n &__multi-value {\n background-color: ", ";\n }\n &__multi-value__label {\n color: ", ";\n font-size: 100%;\n }\n &__multi-value__remove {\n svg {\n fill: ", ";\n }\n }\n }\n }\n }\n"])), function (props) {
12259
12275
  return props.theme.colors.primary;
12260
12276
  }, function (props) {
12261
12277
  return props.theme.colors.ntrlMin;
@@ -341,7 +341,10 @@
341
341
  var backIcon = _ref.backIcon,
342
342
  onBackClick = _ref.onBackClick,
343
343
  stores = _ref.stores,
344
- onContactUsClick = _ref.onContactUsClick;
344
+ contactUsLink = _ref.contactUsLink,
345
+ onContactUsLinkClick = _ref.onContactUsLinkClick,
346
+ _ref$LinkComponent = _ref.LinkComponent,
347
+ LinkComponent = _ref$LinkComponent === void 0 ? 'a' : _ref$LinkComponent;
345
348
  return /*#__PURE__*/React__default.createElement("div", {
346
349
  className: "side-nav__sub-menu"
347
350
  }, /*#__PURE__*/React__default.createElement("button", {
@@ -371,10 +374,10 @@
371
374
  className: "stores-dropdown__open-days"
372
375
  }, store.weekendOpenDays), /*#__PURE__*/React__default.createElement("div", {
373
376
  className: "stores-dropdown__open-hours"
374
- }, store.weekendOpenHours), /*#__PURE__*/React__default.createElement("button", {
375
- type: "button",
377
+ }, store.weekendOpenHours), /*#__PURE__*/React__default.createElement(LinkComponent, {
378
+ href: contactUsLink,
376
379
  className: "stores-dropdown__view-more",
377
- onClick: onContactUsClick
380
+ onClick: onContactUsLinkClick
378
381
  }, "View More"));
379
382
  })));
380
383
  };
@@ -675,10 +678,10 @@
675
678
  productUrl = _ref.productUrl,
676
679
  onAccountClick = _ref.onAccountClick,
677
680
  onCartClick = _ref.onCartClick,
678
- onContactUsClick = _ref.onContactUsClick,
679
- onOurStoryClick = _ref.onOurStoryClick,
680
- onBlogClick = _ref.onBlogClick,
681
- onSellToUsClick = _ref.onSellToUsClick,
681
+ contactUsLink = _ref.contactUsLink,
682
+ ourStoryLink = _ref.ourStoryLink,
683
+ blogLink = _ref.blogLink,
684
+ sellToUsLink = _ref.sellToUsLink,
682
685
  stores = _ref.stores,
683
686
  categoryElements = _ref.categoryElements,
684
687
  showSideNav = _ref.showSideNav,
@@ -688,7 +691,8 @@
688
691
  onCurrencyChange = _ref.onCurrencyChange,
689
692
  isCurrencySelectionDisabled = _ref.isCurrencySelectionDisabled,
690
693
  tooltipContent = _ref.tooltipContent,
691
- LinkComponent = _ref.LinkComponent,
694
+ _ref$LinkComponent = _ref.LinkComponent,
695
+ LinkComponent = _ref$LinkComponent === void 0 ? 'a' : _ref$LinkComponent,
692
696
  categoryConfig = _ref.categoryConfig;
693
697
 
694
698
  var _useState = React.useState(false),
@@ -701,7 +705,7 @@
701
705
  displayedSubMenu = _useState4[0],
702
706
  setDisplayedSubMenu = _useState4[1];
703
707
 
704
- var _useState5 = React.useState(false),
708
+ var _useState5 = React.useState(true),
705
709
  _useState6 = _slicedToArray(_useState5, 2),
706
710
  loading = _useState6[0],
707
711
  setLoading = _useState6[1];
@@ -751,7 +755,7 @@
751
755
  });
752
756
  }
753
757
 
754
- React.useMemo(function () {
758
+ React.useEffect(function () {
755
759
  setLoading(true);
756
760
  axios.get("".concat(categoryConfig.menuData)).then(function (_ref2) {
757
761
  var data = _ref2.data;
@@ -876,31 +880,31 @@
876
880
  }))), /*#__PURE__*/React__default.createElement("div", {
877
881
  className: "side-nav__menu-item",
878
882
  key: "sell-to-us"
879
- }, /*#__PURE__*/React__default.createElement("button", {
880
- type: "button",
883
+ }, /*#__PURE__*/React__default.createElement(LinkComponent, {
884
+ href: sellToUsLink,
881
885
  className: "side-nav__block-button",
882
- onClick: onSellToUsClick
886
+ onClick: onCloseSideNav
883
887
  }, "Sell To Us")), /*#__PURE__*/React__default.createElement("div", {
884
888
  className: "side-nav__menu-item",
885
889
  key: "our-story"
886
- }, /*#__PURE__*/React__default.createElement("button", {
887
- type: "button",
890
+ }, /*#__PURE__*/React__default.createElement(LinkComponent, {
891
+ href: ourStoryLink,
888
892
  className: "side-nav__sub-link",
889
- onClick: onOurStoryClick
890
- }, "Our Story")), typeof onBlogClick === 'function' && /*#__PURE__*/React__default.createElement("div", {
893
+ onClick: onCloseSideNav
894
+ }, "Our Story")), blogLink && /*#__PURE__*/React__default.createElement("div", {
891
895
  className: "side-nav__menu-item",
892
896
  key: "blog"
893
- }, /*#__PURE__*/React__default.createElement("button", {
894
- type: "button",
897
+ }, /*#__PURE__*/React__default.createElement(LinkComponent, {
898
+ href: blogLink,
895
899
  className: "side-nav__sub-link",
896
- onClick: onBlogClick
900
+ onClick: onCloseSideNav
897
901
  }, "Blog")), /*#__PURE__*/React__default.createElement("div", {
898
902
  className: "side-nav__menu-item",
899
903
  key: "contact-us"
900
- }, /*#__PURE__*/React__default.createElement("button", {
901
- type: "button",
904
+ }, /*#__PURE__*/React__default.createElement(LinkComponent, {
905
+ href: contactUsLink,
902
906
  className: "side-nav__sub-link",
903
- onClick: onContactUsClick
907
+ onClick: onCloseSideNav
904
908
  }, "Contact Us")), /*#__PURE__*/React__default.createElement("div", {
905
909
  className: "side-nav__menu-item",
906
910
  key: "my-account"
@@ -929,7 +933,9 @@
929
933
  backIcon: backIcon,
930
934
  onBackClick: onBackClick,
931
935
  stores: stores,
932
- onContactUsClick: onContactUsClick
936
+ contactUsLink: contactUsLink,
937
+ onContactUsLinkClick: onCloseSideNav,
938
+ LinkComponent: LinkComponent
933
939
  })));
934
940
  };
935
941
 
@@ -1564,13 +1570,12 @@
1564
1570
  categoryElements = _ref.categoryElements,
1565
1571
  onAccountClick = _ref.onAccountClick,
1566
1572
  onDashboardClick = _ref.onDashboardClick,
1567
- onContactUsClick = _ref.onContactUsClick,
1568
- onOurStoryClick = _ref.onOurStoryClick,
1569
- _ref$onBlogClick = _ref.onBlogClick,
1570
- onBlogClick = _ref$onBlogClick === void 0 ? undefined : _ref$onBlogClick,
1573
+ contactUsLink = _ref.contactUsLink,
1574
+ ourStoryLink = _ref.ourStoryLink,
1575
+ blogLink = _ref.blogLink,
1571
1576
  bugReportLink = _ref.bugReportLink,
1572
- onSellToUsClick = _ref.onSellToUsClick,
1573
- onLogoClick = _ref.onLogoClick,
1577
+ sellToUsLink = _ref.sellToUsLink,
1578
+ logoHref = _ref.logoHref,
1574
1579
  onLuxityShopClick = _ref.onLuxityShopClick,
1575
1580
  endpoint = _ref.endpoint,
1576
1581
  initialSearchData = _ref.initialSearchData,
@@ -1596,7 +1601,8 @@
1596
1601
  onCurrencyChange = _ref.onCurrencyChange,
1597
1602
  isCurrencySelectionDisabled = _ref.isCurrencySelectionDisabled,
1598
1603
  tooltipContent = _ref.tooltipContent,
1599
- LinkComponent = _ref.LinkComponent,
1604
+ _ref$LinkComponent = _ref.LinkComponent,
1605
+ LinkComponent = _ref$LinkComponent === void 0 ? 'a' : _ref$LinkComponent,
1600
1606
  shop = _ref.shop,
1601
1607
  app = _ref.app,
1602
1608
  categoryConfig = _ref.categoryConfig,
@@ -1686,7 +1692,7 @@
1686
1692
  var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
1687
1693
  var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults, app, productsUrl);
1688
1694
  var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused, setSearchValue);
1689
- React.useMemo(function () {
1695
+ React.useEffect(function () {
1690
1696
  if (!initialSearchData) {
1691
1697
  return;
1692
1698
  }
@@ -1736,10 +1742,6 @@
1736
1742
  return handleClick(onDashboardClick);
1737
1743
  };
1738
1744
 
1739
- var handleSellToUsClick = function handleSellToUsClick() {
1740
- return handleClick(onSellToUsClick);
1741
- };
1742
-
1743
1745
  var handleCartClick = function handleCartClick() {
1744
1746
  return handleClick(onCartClick);
1745
1747
  };
@@ -1792,18 +1794,6 @@
1792
1794
  return handleClick(onAccountClick);
1793
1795
  };
1794
1796
 
1795
- var handleContactUsClick = function handleContactUsClick() {
1796
- return handleClick(onContactUsClick);
1797
- };
1798
-
1799
- var handleOurStoryClick = function handleOurStoryClick() {
1800
- return handleClick(onOurStoryClick);
1801
- };
1802
-
1803
- var handleBlogClick = onBlogClick ? function () {
1804
- return handleClick(onBlogClick);
1805
- } : undefined;
1806
-
1807
1797
  var getInitials = function getInitials(fullName) {
1808
1798
  if (!fullName) return '';
1809
1799
  return fullName.split(' ').map(function (n) {
@@ -1825,9 +1815,8 @@
1825
1815
  className: "navbar__menu-icon"
1826
1816
  })), /*#__PURE__*/React__default.createElement("div", {
1827
1817
  className: "navbar__search-wrapper"
1828
- }, /*#__PURE__*/React__default.createElement("button", {
1829
- type: "button",
1830
- onClick: onLogoClick,
1818
+ }, /*#__PURE__*/React__default.createElement(LinkComponent, {
1819
+ href: logoHref,
1831
1820
  className: "navbar__logo"
1832
1821
  }, /*#__PURE__*/React__default.createElement("img", {
1833
1822
  src: logoSrc,
@@ -1929,10 +1918,10 @@
1929
1918
  productUrl: productsUrl,
1930
1919
  onAccountClick: handleAccountClick,
1931
1920
  onCartClick: handleCartClick,
1932
- onContactUsClick: handleContactUsClick,
1933
- onOurStoryClick: handleOurStoryClick,
1934
- onBlogClick: handleBlogClick,
1935
- onSellToUsClick: handleSellToUsClick,
1921
+ contactUsLink: contactUsLink,
1922
+ ourStoryLink: ourStoryLink,
1923
+ blogLink: blogLink,
1924
+ sellToUsLink: sellToUsLink,
1936
1925
  stores: stores,
1937
1926
  categoryElements: categoryElements,
1938
1927
  showSideNav: showSideNav,