Browse Source

disable atome and new navbar link

master
azri 1 week ago
parent
commit
91b5d706e4

+ 2
- 0
src/App.js View File

@@ -9,6 +9,7 @@ import ReturnExchange from './pages/ReturnExchange';
9 9
 import PrivacyNotice from './pages/PrivacyNotice';
10 10
 import ShoppingFAQs from './pages/ShoppingFAQs';
11 11
 import DeliveryInfo from './pages/DeliveryInfo';
12
+import ContactUs from './pages/ContactUs';
12 13
 import Product from './pages/Products/Product';
13 14
 import Checkout from './pages/Checkout';
14 15
 import Navbar from './components/Navbar';
@@ -68,6 +69,7 @@ function App() {
68 69
           <Route path='/return_and_exchange' element={<ReturnExchange />} /> 
69 70
           <Route path='/privacy_notice' element={<PrivacyNotice />} />
70 71
           <Route path='/shopping_faqs' element={<ShoppingFAQs />} /> 
72
+          <Route path='/contact_us' element={<ContactUs />} />
71 73
           <Route path='/collection/:pid' element={<Collection />}/>
72 74
 
73 75
         </Routes>

BIN
src/assets/images/atome.webp View File


+ 65
- 1
src/components/Navbar/Navbar.jsx View File

@@ -123,6 +123,7 @@ const Navbar = () => {
123 123
   const [openSideMenu, setOpenSideMenu] = useState(false);
124 124
   const [openSideCart, setOpenSideCart] = useState(false);
125 125
   const [navItem, setNavItem] = useState([]);
126
+  const [navItemCompanyInfo, setNavItemCompanyInfo] = useState([]);
126 127
 
127 128
   const [displayCollection, setDisplayCollection] = useState({
128 129
     productType: null,
@@ -162,8 +163,27 @@ const Navbar = () => {
162 163
 
163 164
       let navItemData = mapProductTypesWithCollections(products)
164 165
       navItemData = getUniqueCollections(navItemData)
166
+
165 167
       setNavItem(navItemData)
166 168
 
169
+      // extra info for the navbar
170
+      setNavItemCompanyInfo([{
171
+        name:"DELIVERY INFORMATION",
172
+        link:"/delivery_info"
173
+      },
174
+      {
175
+        name:"SALE TERMS & CONDITIONS",
176
+        link:"/sale_terms_and_condition"
177
+      },
178
+      {
179
+        name:"RETURNS & REFUNDS",
180
+        link:"/return_and_exchange"
181
+      },
182
+      {
183
+        name:"CONTACT US",
184
+        link:"/contact_us"
185
+      }]);
186
+
167 187
     }
168 188
 
169 189
   }, [products])
@@ -411,6 +431,50 @@ const Navbar = () => {
411 431
                   }}>{productType}</Typography>
412 432
               </Button>))}
413 433
 
434
+              {navItemCompanyInfo.map(({ name, link }) => (<Button
435
+                sx={{
436
+                  position: "relative",
437
+                  ':hover': {
438
+                    backgroundColor: "rgba(0,0,0,0)",
439
+                  }
440
+                }}
441
+                color="inherit"
442
+                onClick={() => {
443
+                  window.location.href = `${link}`;
444
+                }}
445
+              >
446
+                <Typography variant="body2"
447
+                  className="navItem"
448
+                  sx={{
449
+                    fontSize: {
450
+                      xs: "0.73rem",
451
+                      sm: "0.73rem",
452
+                      md: "0.875rem",
453
+                    },
454
+                    color: (isAtTop) ? "white" : "black",
455
+                    transition: "all 0.3s ease-in-out",
456
+                    ":hover": {
457
+                      color: "#95AAC5 !important"
458
+                    },
459
+                    "&::after": {
460
+                      content: '""',
461
+                      position: "absolute",
462
+                      left: "50%",
463
+                      transform: "translateX(-50%)",
464
+                      bottom: 2,
465
+                      width: "0%",
466
+                      height: "2px", // Thickness of the underline
467
+                      backgroundColor: "#95AAC5",
468
+                      transition: "width 0.3s ease-in-out",
469
+                    },
470
+                    ":hover::after": {
471
+                      width: "70%", // Expands on hover
472
+                    },
473
+                  }}>{name}</Typography>
474
+              </Button>))}
475
+
476
+
477
+
414 478
             </Box>
415 479
 
416 480
             {/* Right Section: Search and Profile */}
@@ -514,7 +578,7 @@ const Navbar = () => {
514 578
       </AppBar>
515 579
       {showSearch && <SearchProduct onClose={() => { setShowSearch(false) }} />}
516 580
 
517
-      <MobileNav open={openSideMenu} menu={navItem} onClose={() => { setOpenSideMenu(false) }} />
581
+      <MobileNav open={openSideMenu} menu={navItem} infomenu={navItemCompanyInfo} onClose={() => { setOpenSideMenu(false) }} />
518 582
       <SideCart open={openSideCart} onClose={() => { setOpenSideCart(false) }} />
519 583
 
520 584
     </>

+ 34
- 3
src/components/Navbar/components/MobileNav/MobileNav.jsx View File

@@ -5,7 +5,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
5 5
 import Grid from '@mui/material/Grid2';
6 6
 import logoSrc from "../../../../assets/images/amberlogo.png";
7 7
 
8
-const MobileNav = ({ open, onClose, menu = [] }) => {
8
+const MobileNav = ({ open, onClose, menu = [], infomenu = [] }) => {
9 9
 
10 10
   // React.useEffect(()=>{
11 11
 
@@ -20,7 +20,7 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
20 20
       <Grid
21 21
         size={6}
22 22
         className="animate__animated animate__fadeIn animate__fast"
23
-        sx={{pr:1, pb:1}}
23
+        sx={{ pr: 1, pb: 1 }}
24 24
       >
25 25
         <Box
26 26
           sx={{
@@ -31,7 +31,7 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
31 31
             paddingTop: "80%",
32 32
             position: "relative",
33 33
             cursor: "pointer",
34
-            mb:1,
34
+            mb: 1,
35 35
             transition: "transform 0.3s ease",
36 36
             ":hover": {
37 37
               transform: "scale(1.1)"
@@ -168,6 +168,37 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
168 168
           </Accordion>
169 169
         ))}
170 170
 
171
+        {infomenu.map(({ name, link }) => (
172
+          <Accordion
173
+            disableGutters={true}
174
+            onClick={() => {
175
+              window.location.href = `${link}`;
176
+            }}
177
+            sx={{
178
+              backgroundColor: "rgba(0,0,0,0)",
179
+              boxShadow: "none"
180
+            }}>
181
+            <AccordionSummary
182
+              aria-controls="panel1-content"
183
+              id="panel1-header"
184
+            >
185
+              <Typography
186
+                variant="body1"
187
+                sx={{
188
+                  fontSize: {
189
+                    xs: "0.73rem",
190
+                    sm: "0.73rem",
191
+                    md: "0.875rem",
192
+                  },
193
+                }}
194
+              >
195
+                {name?.toUpperCase()}
196
+              </Typography>
197
+            </AccordionSummary>
198
+          </Accordion>
199
+        ))}
200
+
201
+
171 202
       </Box>
172 203
     </Drawer>
173 204
   );

+ 18
- 4
src/components/ProductList/ProductList.jsx View File

@@ -15,6 +15,7 @@ import { useSelector, useDispatch } from "react-redux";
15 15
 import { fetchProducts } from "../../redux/slices/productSlice";
16 16
 import { useNavigate } from "react-router-dom";
17 17
 import defaultImage from "../../assets/images/default.png"
18
+import atomeLogo from "../../assets/images/atome.webp"
18 19
 
19 20
 //UTIL FUNCTION
20 21
 function getAllTags(data) {
@@ -130,7 +131,7 @@ const ProductList = ({ size = 99999 }) => {
130 131
 
131 132
       // Collection
132 133
       newFilteredProducts = newFilteredProducts.filter((product) => {
133
-        if (collection == "all" || collection == "collection" ) {
134
+        if (collection == "all" || collection == "collection") {
134 135
           return product.productType === productType;
135 136
         } else {
136 137
           return (
@@ -293,6 +294,19 @@ const ProductList = ({ size = 99999 }) => {
293 294
               {`${minDiscountPriceCurrency} ${parseFloat(minDiscountPrice).toFixed(2)}`}
294 295
             </Typography>}
295 296
 
297
+            {/* <Typography
298
+              variant="body2"
299
+              sx={{
300
+                fontWeight: "100",
301
+                fontSize: {
302
+                  xs: "0.73rem",
303
+                  sm: "0.73rem",
304
+                  md: "0.875rem",
305
+                },
306
+              }}
307
+            >
308
+              or 3 payments of <span style={{fontWeight:"900"}}>  {`${parseFloat((minPrice/3)).toFixed(2)} ${minPriceCurrency}`}</span> with <span style={{fontWeight:"900"}}>Atome <img style={{marginLeft:5, verticalAlign:"middle"}} width="15" src={atomeLogo} /> </span>
309
+            </Typography> */}
296 310
 
297 311
           </Box>
298 312
         </Box>
@@ -308,9 +322,9 @@ const ProductList = ({ size = 99999 }) => {
308 322
           display: "flex",
309 323
           justifyContent: "space-between",
310 324
           py: {
311
-            xs:0,
312
-            sm:0,
313
-            md:1
325
+            xs: 0,
326
+            sm: 0,
327
+            md: 1
314 328
           },
315 329
           flexDirection: {
316 330
             xs: "column",

+ 40
- 0
src/pages/ContactUs.jsx View File

@@ -0,0 +1,40 @@
1
+import React from 'react'
2
+import { Box, Typography } from '@mui/material'
3
+import LocalPhoneIcon from '@mui/icons-material/LocalPhone'
4
+
5
+const ContactUs = () => {
6
+  return (
7
+    <Box sx={{
8
+      mt: 10,
9
+      px: {
10
+        xs: 2,
11
+        md: 5,
12
+        lg: 5
13
+      },
14
+      mb: {
15
+        xs: 0,
16
+        md: 5,
17
+        lg: 10
18
+      },
19
+      display: "flex",
20
+      height: "50vh",
21
+    }}>
22
+
23
+      <Box sx={{mx:"auto", my:"auto"}}>
24
+
25
+        <Typography variant="h4" sx={{ maxWidth: 650, mb: 2 }}><span style={{ fontWeight: "bold" }}>AMBER MODE (M) SDN BHD (1109469-M) <br /> </span> Lot G-77, Wangsa Walk Mall, <br />Wangsa Avenue, <br />No.9, Jalan Wangsa Perdana 1, <br />Bandar Wangsa Maju, <br />53300 Kuala Lumpur, <br />Malaysia</Typography>
26
+        <Typography
27
+          variant="h4"
28
+          sx={{ display: "flex", alignItems: "center" }}
29
+        >
30
+          <LocalPhoneIcon sx={{ mr: 1 }} />
31
+          +60 17228 2072
32
+        </Typography>
33
+
34
+      </Box>
35
+
36
+    </Box>
37
+  )
38
+}
39
+
40
+export default ContactUs

Loading…
Cancel
Save