Browse Source

fix mobilenavbar

master
azri 1 week ago
parent
commit
3844d8607e

+ 1
- 1
src/components/CategoryList/CategoryList.jsx View File

37
             
37
             
38
            }}
38
            }}
39
             onClick={()=>{
39
             onClick={()=>{
40
-              sessionStorage.removeItem('amber-select-collection')
40
+              //sessionStorage.removeItem('amber-select-collection')
41
               sessionStorage.setItem('amber-select-category', label)
41
               sessionStorage.setItem('amber-select-category', label)
42
               window.location.href = "/products" 
42
               window.location.href = "/products" 
43
             }}
43
             }}

+ 2
- 29
src/components/Navbar/components/MobileNav/MobileNav.jsx View File

36
           }
36
           }
37
         }}
37
         }}
38
         onClick={() => {
38
         onClick={() => {
39
-          // sessionStorage.setItem('amber-select-collection', colletion?.title)
40
-          // sessionStorage.setItem('amber-select-product-type', displayCollection.productType)
39
+          sessionStorage.setItem('amber-select-collection', colletion?.title)
41
           window.location.href = `/products`;
40
           window.location.href = `/products`;
42
         }}
41
         }}
43
       >
42
       >
116
 
115
 
117
       {/* Main Navigation */}
116
       {/* Main Navigation */}
118
       <Box sx={{ width: "100%" }} role="presentation">
117
       <Box sx={{ width: "100%" }} role="presentation">
119
-        {/* <List>
120
-          {menu.map(({ productType, collection }) => (
121
-            <ListItem key={productType} disablePadding>
122
-              <ListItemButton
123
-                onClick={() => { 
124
-                  sessionStorage.setItem('amber-select-collection', productType)
125
-                  sessionStorage.removeItem('amber-select-collection')
126
-                  if(collection?.length == 0) window.location.href = `/products`;
127
-                }}
128
-                sx={{
129
-                  borderTop:"1px solid rgba(0,0,0,0.1)",
130
-                  "&:hover": {
131
-                    backgroundColor: "#95AAC5",
132
-                  },
133
-                }}
134
-              >
135
-                <ListItemText sx={{ 
136
-                  ml: 2, 
137
-                  color: "black",
138
-                }} primary={productType?.toUpperCase()} />
139
-                {(collection?.length > 0) && <ArrowDropDownIcon fontSize="small" sx={{color:"black"}} /> }
140
-              </ListItemButton>
141
-            </ListItem>
142
-          ))}
143
-        </List> */}
144
         {menu.map(({ productType, collection }) => (
118
         {menu.map(({ productType, collection }) => (
145
           <Accordion
119
           <Accordion
146
             disableGutters={true}
120
             disableGutters={true}
147
             onClick={() => {
121
             onClick={() => {
148
-              sessionStorage.setItem('amber-select-collection', productType)
149
-              sessionStorage.removeItem('amber-select-collection')
122
+              sessionStorage.setItem('amber-select-product-type', productType)
150
               if (collection?.length == 0) window.location.href = `/products`;
123
               if (collection?.length == 0) window.location.href = `/products`;
151
             }}
124
             }}
152
             sx={{
125
             sx={{

Loading…
Cancel
Save