Browse Source

fix navbar

master
azri 2 weeks ago
parent
commit
72ad7b8005

+ 9
- 12
src/components/Navbar/Navbar.jsx View File

63
   },
63
   },
64
   {
64
   {
65
     title: "HOME",
65
     title: "HOME",
66
-    link: "/",
66
+    link: "/products",
67
     icon: <HomeIcon />
67
     icon: <HomeIcon />
68
   },
68
   },
69
   {
69
   {
70
     title: "BEAUTY",
70
     title: "BEAUTY",
71
     link: "/products",
71
     link: "/products",
72
     icon: <BrushIcon />
72
     icon: <BrushIcon />
73
-  },
74
-  {
75
-    title: "SALE",
76
-    link: "/products",
77
-    icon: <LoyaltyIcon />
78
   }
73
   }
79
 ]
74
 ]
80
 
75
 
126
       <AppBar position="fixed"
121
       <AppBar position="fixed"
127
         sx={{
122
         sx={{
128
           backgroundColor: {
123
           backgroundColor: {
129
-            xs: showHeader ? "rgba(0,0,0,0)" : "background.black",// somehow the logic for scrolling header is the same so I just gonna use showHeader state
124
+            xs: "background.black",
130
             md: "rgba(0,0,0,0.9)",
125
             md: "rgba(0,0,0,0.9)",
131
             lg: "background.black"
126
             lg: "background.black"
132
           },
127
           },
158
               lg: "block"
153
               lg: "block"
159
             }
154
             }
160
           }}>
155
           }}>
161
-            <img src={logoSrc} alt="Logo"
162
-              style={{
163
-                width: 150,
164
-                height: 50,
165
-              }} />
156
+            <a href="/">
157
+              <img src={logoSrc} alt="Logo"
158
+                style={{
159
+                  width: 150,
160
+                  height: 50,
161
+                }} />
162
+            </a>
166
           </Box>
163
           </Box>
167
 
164
 
168
           {/* SIDEBAR BUTTON */}
165
           {/* SIDEBAR BUTTON */}

+ 14
- 11
src/components/Navbar/components/MobileNav/MobileNav.jsx View File

24
           height: 80,
24
           height: 80,
25
         }}
25
         }}
26
       >
26
       >
27
-        <img
28
-          src={logoSrc}
29
-          alt="Logo"
30
-          style={{
31
-            width: 150,
32
-            height: 50,
33
-          }}
34
-        />
27
+        <a href="/">
28
+          <img
29
+            src={logoSrc}
30
+            alt="Logo"
31
+            style={{
32
+              width: 150,
33
+              height: 50,
34
+            }}
35
+          />
36
+        </a>
37
+
35
       </Box>
38
       </Box>
36
 
39
 
37
       {/* Main Navigation */}
40
       {/* Main Navigation */}
38
       <Box sx={{ width: 250 }} role="presentation">
41
       <Box sx={{ width: 250 }} role="presentation">
39
         <List>
42
         <List>
40
-          {menu.map(({title, link, icon}) => (
43
+          {menu.map(({ title, link, icon }) => (
41
             <ListItem key={title} disablePadding>
44
             <ListItem key={title} disablePadding>
42
               <ListItemButton
45
               <ListItemButton
43
-                onClick={()=>{window.location.href = link }}
46
+                onClick={() => { window.location.href = link }}
44
                 sx={{
47
                 sx={{
45
                   color: "white",
48
                   color: "white",
46
                   "&:hover": {
49
                   "&:hover": {
50
                 }}
53
                 }}
51
               >
54
               >
52
                 {icon}
55
                 {icon}
53
-                <ListItemText sx={{ml:2}} primary={title} />
56
+                <ListItemText sx={{ ml: 2 }} primary={title} />
54
               </ListItemButton>
57
               </ListItemButton>
55
             </ListItem>
58
             </ListItem>
56
           ))}
59
           ))}

+ 2
- 2
src/components/ProductList/ProductList.jsx View File

44
             }}
44
             }}
45
           />
45
           />
46
 
46
 
47
-          <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
47
+          {/* <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
48
             NEW
48
             NEW
49
-          </Button>
49
+          </Button> */}
50
 
50
 
51
           <Box sx={{ py: 5 }}>
51
           <Box sx={{ py: 5 }}>
52
             <Typography variant="body2" >
52
             <Typography variant="body2" >

+ 2
- 2
src/components/ProductSelected/ProductSelected.jsx View File

59
               }}
59
               }}
60
             />
60
             />
61
 
61
 
62
-            <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
62
+            {/* <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
63
               NEW
63
               NEW
64
-            </Button>
64
+            </Button> */}
65
 
65
 
66
             <Box sx={{ py: 5 }}>
66
             <Box sx={{ py: 5 }}>
67
               <Typography variant="body2" >
67
               <Typography variant="body2" >

Loading…
Cancel
Save