Browse Source

fix navbar

master
azri 2 weeks ago
parent
commit
72ad7b8005

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

@@ -63,18 +63,13 @@ const navItem = [
63 63
   },
64 64
   {
65 65
     title: "HOME",
66
-    link: "/",
66
+    link: "/products",
67 67
     icon: <HomeIcon />
68 68
   },
69 69
   {
70 70
     title: "BEAUTY",
71 71
     link: "/products",
72 72
     icon: <BrushIcon />
73
-  },
74
-  {
75
-    title: "SALE",
76
-    link: "/products",
77
-    icon: <LoyaltyIcon />
78 73
   }
79 74
 ]
80 75
 
@@ -126,7 +121,7 @@ const Navbar = () => {
126 121
       <AppBar position="fixed"
127 122
         sx={{
128 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 125
             md: "rgba(0,0,0,0.9)",
131 126
             lg: "background.black"
132 127
           },
@@ -158,11 +153,13 @@ const Navbar = () => {
158 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 163
           </Box>
167 164
 
168 165
           {/* SIDEBAR BUTTON */}

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

@@ -24,23 +24,26 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
24 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 38
       </Box>
36 39
 
37 40
       {/* Main Navigation */}
38 41
       <Box sx={{ width: 250 }} role="presentation">
39 42
         <List>
40
-          {menu.map(({title, link, icon}) => (
43
+          {menu.map(({ title, link, icon }) => (
41 44
             <ListItem key={title} disablePadding>
42 45
               <ListItemButton
43
-                onClick={()=>{window.location.href = link }}
46
+                onClick={() => { window.location.href = link }}
44 47
                 sx={{
45 48
                   color: "white",
46 49
                   "&:hover": {
@@ -50,7 +53,7 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
50 53
                 }}
51 54
               >
52 55
                 {icon}
53
-                <ListItemText sx={{ml:2}} primary={title} />
56
+                <ListItemText sx={{ ml: 2 }} primary={title} />
54 57
               </ListItemButton>
55 58
             </ListItem>
56 59
           ))}

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

@@ -44,9 +44,9 @@ const ProductList = ({ size = 99999 }) => {
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 48
             NEW
49
-          </Button>
49
+          </Button> */}
50 50
 
51 51
           <Box sx={{ py: 5 }}>
52 52
             <Typography variant="body2" >

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

@@ -59,9 +59,9 @@ const ProductSelected = () => {
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 63
               NEW
64
-            </Button>
64
+            </Button> */}
65 65
 
66 66
             <Box sx={{ py: 5 }}>
67 67
               <Typography variant="body2" >

Loading…
Cancel
Save