|
|
@@ -83,6 +83,10 @@ const COLLECTION_PRIORITY_BY_TYPE = {
|
|
83
|
83
|
|
|
84
|
84
|
const normalizeTitle = (value = "") => value.trim().toUpperCase();
|
|
85
|
85
|
|
|
|
86
|
+const getProductTypeMenuLabel = (productType = "") => {
|
|
|
87
|
+ return normalizeTitle(productType) === "BEAUTY" ? "Essentials" : productType;
|
|
|
88
|
+};
|
|
|
89
|
+
|
|
86
|
90
|
const sortCollectionsByPriority = (collection = [], productType = "") => {
|
|
87
|
91
|
const typeKey = (productType || "").trim().toLowerCase();
|
|
88
|
92
|
const priorityList = COLLECTION_PRIORITY_BY_TYPE[typeKey] || [];
|
|
|
@@ -216,10 +220,13 @@ const Navbar = () => {
|
|
216
|
220
|
|
|
217
|
221
|
let navItemData = mapProductTypesWithCollections(products)
|
|
218
|
222
|
navItemData = getUniqueCollections(navItemData)
|
|
|
223
|
+ navItemData = navItemData.filter(({ productType }) => normalizeTitle(productType) !== "HOME")
|
|
219
|
224
|
|
|
220
|
225
|
setNavItem(navItemData)
|
|
221
|
226
|
|
|
222
|
227
|
// extra info for the navbar
|
|
|
228
|
+ setNavItemCompanyInfo([]);
|
|
|
229
|
+ /*
|
|
223
|
230
|
setNavItemCompanyInfo([{
|
|
224
|
231
|
name:"DELIVERY INFORMATION",
|
|
225
|
232
|
link:"/delivery_info"
|
|
|
@@ -236,6 +243,7 @@ const Navbar = () => {
|
|
236
|
243
|
name:"CONTACT US",
|
|
237
|
244
|
link:"/contact_us"
|
|
238
|
245
|
}]);
|
|
|
246
|
+ */
|
|
239
|
247
|
|
|
240
|
248
|
}
|
|
241
|
249
|
|
|
|
@@ -480,7 +488,7 @@ const Navbar = () => {
|
|
480
|
488
|
":hover::after": {
|
|
481
|
489
|
width: "50%", // Expands on hover
|
|
482
|
490
|
},
|
|
483
|
|
- }}>{productType}</Typography>
|
|
|
491
|
+ }}>{getProductTypeMenuLabel(productType)}</Typography>
|
|
484
|
492
|
</Button>))}
|
|
485
|
493
|
|
|
486
|
494
|
{navItemCompanyInfo.map(({ name, link }) => (<Button
|