|
|
@@ -29,6 +29,7 @@ import { Scrollbar, A11y, Navigation } from 'swiper/modules';
|
|
29
|
29
|
|
|
30
|
30
|
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
31
|
31
|
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
|
|
32
|
+import { NAV_MENU_STRUCTURE as SHARED_NAV_MENU_STRUCTURE } from "../../config/menuCollections";
|
|
32
|
33
|
|
|
33
|
34
|
function calculateTotalQuantity(cartItems) {
|
|
34
|
35
|
return cartItems.reduce((total, item) => total + item.quantity, 0);
|
|
|
@@ -89,6 +90,9 @@ const getProductTypeMenuLabel = (productType = "") => {
|
|
89
|
90
|
return normalizeTitle(productType) === "BEAUTY" ? "Essentials" : productType;
|
|
90
|
91
|
};
|
|
91
|
92
|
|
|
|
93
|
+const NAV_MENU_STRUCTURE = SHARED_NAV_MENU_STRUCTURE;
|
|
|
94
|
+
|
|
|
95
|
+/*
|
|
92
|
96
|
const NAV_MENU_STRUCTURE = [
|
|
93
|
97
|
{
|
|
94
|
98
|
productType: "Apparel",
|
|
|
@@ -97,7 +101,6 @@ const NAV_MENU_STRUCTURE = [
|
|
97
|
101
|
{
|
|
98
|
102
|
label: "Casual",
|
|
99
|
103
|
children: [
|
|
100
|
|
- // Local Shopify collection title is "DENIM ND X MARII FOR AMBER"; old/reference title: "ND X MARII FOR AMBER".
|
|
101
|
104
|
{ label: "ND X Marii for Amber", titles: ["DENIM ND X MARII FOR AMBER", "ND X MARII FOR AMBER"] },
|
|
102
|
105
|
{ label: "Somewhere Somehow Someone", titles: ["SOMEWHERE SOMEHOW SOMEONE"] },
|
|
103
|
106
|
{ label: "Flower Power", titles: ["FLOWER POWER"] },
|
|
|
@@ -106,9 +109,7 @@ const NAV_MENU_STRUCTURE = [
|
|
106
|
109
|
{
|
|
107
|
110
|
label: "Traditional",
|
|
108
|
111
|
children: [
|
|
109
|
|
- // label is the display name, titles are the collection names that will be matched to the product collections in shopify
|
|
110
|
112
|
{ label: "Eid's Time For Love", titles: ["EID'S TIME FOR LOVE"] },
|
|
111
|
|
- // Local Shopify collection title is "RAYA ROMANTICS"; old/reference title: "RAYA ROMANTICS COLLECTION 2025".
|
|
112
|
113
|
{ label: "Raya Romantics", titles: ["RAYA ROMANTICS", "RAYA ROMANTICS COLLECTION 2025"] },
|
|
113
|
114
|
{ label: "Atma Sari", titles: ["ATMA SARI"] },
|
|
114
|
115
|
{ label: "Oasis abaya", titles: ["OASIS ABAYA COLLECTION", "MIRAGE COLLECTION"] },
|
|
|
@@ -125,6 +126,7 @@ const NAV_MENU_STRUCTURE = [
|
|
125
|
126
|
],
|
|
126
|
127
|
},
|
|
127
|
128
|
];
|
|
|
129
|
+*/
|
|
128
|
130
|
|
|
129
|
131
|
const sortCollectionsByPriority = (collection = [], productType = "") => {
|
|
130
|
132
|
const typeKey = (productType || "").trim().toLowerCase();
|