Browse Source

change carousel and productlist filter

master
azri 1 week ago
parent
commit
d4ff6ab11e

+ 1
- 1
package-lock.json View File

27
         "react-dom": "^18.3.1",
27
         "react-dom": "^18.3.1",
28
         "react-redux": "^9.2.0",
28
         "react-redux": "^9.2.0",
29
         "react-router-dom": "^7.0.2",
29
         "react-router-dom": "^7.0.2",
30
-        "react-scripts": "5.0.1",
30
+        "react-scripts": "^5.0.1",
31
         "shopify-api-node": "^3.14.0",
31
         "shopify-api-node": "^3.14.0",
32
         "swiper": "^11.1.4",
32
         "swiper": "^11.1.4",
33
         "web-vitals": "^2.1.4"
33
         "web-vitals": "^2.1.4"

+ 2
- 2
package.json View File

22
     "react-dom": "^18.3.1",
22
     "react-dom": "^18.3.1",
23
     "react-redux": "^9.2.0",
23
     "react-redux": "^9.2.0",
24
     "react-router-dom": "^7.0.2",
24
     "react-router-dom": "^7.0.2",
25
-    "react-scripts": "5.0.1",
25
+    "react-scripts": "^5.0.1",
26
     "shopify-api-node": "^3.14.0",
26
     "shopify-api-node": "^3.14.0",
27
     "swiper": "^11.1.4",
27
     "swiper": "^11.1.4",
28
     "web-vitals": "^2.1.4"
28
     "web-vitals": "^2.1.4"
29
   },
29
   },
30
   "scripts": {
30
   "scripts": {
31
-    "start": "set GENERATE_SOURCEMAP=false && react-scripts start",
31
+    "start": "react-scripts start",
32
     "build": "react-scripts build",
32
     "build": "react-scripts build",
33
     "test": "react-scripts test",
33
     "test": "react-scripts test",
34
     "eject": "react-scripts eject"
34
     "eject": "react-scripts eject"

+ 1
- 29
src/components/Carousel/Carousel.jsx View File

38
         justifyContent: "center",
38
         justifyContent: "center",
39
         width: "100%",
39
         width: "100%",
40
         objectPosition: "top center",
40
         objectPosition: "top center",
41
-        height: "100vh",
42
         overflow: "hidden",
41
         overflow: "hidden",
43
       }}
42
       }}
44
     >
43
     >
59
           src={item.img_src}
58
           src={item.img_src}
60
           alt={item.alt_name}
59
           alt={item.alt_name}
61
           sx={{
60
           sx={{
62
-            display: {
63
-              xs:"none",
64
-              sm:"none",
65
-              md:"block",
66
-              lg:"block"
67
-            },
68
             width: "100%",
61
             width: "100%",
69
             height: "100%",
62
             height: "100%",
70
             backgroundImage: `url(${item.img_src})`,
63
             backgroundImage: `url(${item.img_src})`,
74
         />
67
         />
75
       ))}
68
       ))}
76
 
69
 
77
-      {/* Mobile View - Cause the image keep getting wrong offest */}
78
-      {items_mobile.map((item, index) => (
79
-        <Box
80
-          key={index}
81
-          component="img"
82
-          src={item.img_src}
83
-          alt={item.alt_name}
84
-          sx={{
85
-            display: {
86
-              xs:"block",
87
-              sm:"block",
88
-              md:"none",
89
-              lg:"none"
90
-            },
91
-            width: "100%",
92
-            height: "100%",
93
-            backgroundImage: `url(${item.img_src})`,
94
-            objectFit: "cover",
95
-            objectPosition: "center center",
96
-          }}
97
-        />
98
-      ))}
70
+
99
 
71
 
100
     </Box>
72
     </Box>
101
   );
73
   );

+ 1
- 6
src/components/ProductList/ProductList.jsx View File

254
 
254
 
255
         {/* Right Side: Option Inputs */}
255
         {/* Right Side: Option Inputs */}
256
         <Box sx={{
256
         <Box sx={{
257
-          display: "flex", gap: 2, flexDirection: {
258
-            xs: "column",
259
-            sm: "row",
260
-            md: "row",
261
-            lg: "row"
262
-          },
257
+          display: "flex", gap: 2, flexDirection: "row", flexWrap:"wrap"
263
         }}>
258
         }}>
264
 
259
 
265
           {(tagFilterOption.length > 0) && <FormControl sx={{ m: 1, display: "flex", flexDirection: "row" }} variant="standard">
260
           {(tagFilterOption.length > 0) && <FormControl sx={{ m: 1, display: "flex", flexDirection: "row" }} variant="standard">

Loading…
Cancel
Save