Преглед изворни кода

change carousel and productlist filter

master
azri пре 1 недеља
родитељ
комит
d4ff6ab11e
4 измењених фајлова са 5 додато и 38 уклоњено
  1. 1
    1
      package-lock.json
  2. 2
    2
      package.json
  3. 1
    29
      src/components/Carousel/Carousel.jsx
  4. 1
    6
      src/components/ProductList/ProductList.jsx

+ 1
- 1
package-lock.json Прегледај датотеку

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

+ 2
- 2
package.json Прегледај датотеку

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

+ 1
- 29
src/components/Carousel/Carousel.jsx Прегледај датотеку

@@ -38,7 +38,6 @@ const Carousel = () => {
38 38
         justifyContent: "center",
39 39
         width: "100%",
40 40
         objectPosition: "top center",
41
-        height: "100vh",
42 41
         overflow: "hidden",
43 42
       }}
44 43
     >
@@ -59,12 +58,6 @@ const Carousel = () => {
59 58
           src={item.img_src}
60 59
           alt={item.alt_name}
61 60
           sx={{
62
-            display: {
63
-              xs:"none",
64
-              sm:"none",
65
-              md:"block",
66
-              lg:"block"
67
-            },
68 61
             width: "100%",
69 62
             height: "100%",
70 63
             backgroundImage: `url(${item.img_src})`,
@@ -74,28 +67,7 @@ const Carousel = () => {
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 72
     </Box>
101 73
   );

+ 1
- 6
src/components/ProductList/ProductList.jsx Прегледај датотеку

@@ -254,12 +254,7 @@ const ProductList = ({ size = 99999 }) => {
254 254
 
255 255
         {/* Right Side: Option Inputs */}
256 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 260
           {(tagFilterOption.length > 0) && <FormControl sx={{ m: 1, display: "flex", flexDirection: "row" }} variant="standard">

Loading…
Откажи
Сачувај