|
|
@@ -30,11 +30,15 @@ const MobileNav = ({ open, onClose, menu = [], infomenu = [], products = [] }) =
|
|
30
|
30
|
|
|
31
|
31
|
const findCollectionForMenuItem = (productType, item) => {
|
|
32
|
32
|
const targetTitles = (item?.titles || []).map(normalizeTitle);
|
|
|
33
|
+ const targetHandles = (item?.handles || []).map(normalizeTitle);
|
|
33
|
34
|
|
|
34
|
35
|
return products
|
|
35
|
36
|
.filter((product) => product.productType === productType)
|
|
36
|
37
|
.flatMap((product) => product.collections || [])
|
|
37
|
|
- .find((collection) => targetTitles.includes(normalizeTitle(collection?.title || "")));
|
|
|
38
|
+ .find((collection) =>
|
|
|
39
|
+ targetTitles.includes(normalizeTitle(collection?.title || "")) ||
|
|
|
40
|
+ targetHandles.includes(normalizeTitle(collection?.handle || ""))
|
|
|
41
|
+ );
|
|
38
|
42
|
}
|
|
39
|
43
|
|
|
40
|
44
|
const getMenuCollectionTitles = (productType) => {
|