Procházet zdrojové kódy

remove feature on mobile screen

master
azri před 1 týdnem
rodič
revize
fc4d5216fc
2 změnil soubory, kde provedl 28 přidání a 11 odebrání
  1. 9
    0
      src/pages/Products/Product.jsx
  2. 19
    11
      src/pages/Products/index.jsx

+ 9
- 0
src/pages/Products/Product.jsx Zobrazit soubor

@@ -107,7 +107,16 @@ const Product = () => {
107 107
 
108 108
 
109 109
       <SocialMedia />
110
+      <Box sx={{
111
+        display:{
112
+          xs:"none",
113
+          sm:"none",
114
+          md:"block"
115
+        }
116
+      }}>
110 117
       <Feature />
118
+      </Box>
119
+      
111 120
     </Box>
112 121
 
113 122
   )

+ 19
- 11
src/pages/Products/index.jsx Zobrazit soubor

@@ -1,4 +1,4 @@
1
-import {useEffect, useState} from 'react'
1
+import { useEffect, useState } from 'react'
2 2
 import PageTitle from '../../components/PageTitle'
3 3
 import Filter from '../../components/Filter'
4 4
 import ProductList from '../../components/ProductList'
@@ -10,26 +10,26 @@ const Products = () => {
10 10
 
11 11
   const [collection, setCollection] = useState(null)
12 12
 
13
-  useEffect(()=>{
14
-    
13
+  useEffect(() => {
14
+
15 15
     // if user come from select collection
16
-    if(sessionStorage.getItem('amber-select-product-type')){
16
+    if (sessionStorage.getItem('amber-select-product-type')) {
17 17
 
18
-      if(sessionStorage.getItem('amber-select-collection')){
18
+      if (sessionStorage.getItem('amber-select-collection')) {
19 19
         let selectCollection = JSON.parse(sessionStorage.getItem('amber-select-collection'))
20 20
         setCollection(selectCollection)
21 21
       }
22
-      
23
-    }else{
22
+
23
+    } else {
24 24
       window.location.href = '/'
25 25
     }
26 26
 
27
-  },[])
27
+  }, [])
28 28
 
29 29
   return (
30 30
     <>
31 31
       <Box sx={{
32
-        mt:10,
32
+        mt: 10,
33 33
         px: {
34 34
           xs: 2,
35 35
           md: 5,
@@ -41,10 +41,18 @@ const Products = () => {
41 41
           lg: 10
42 42
         }
43 43
       }}>
44
-        {collection && <PageTitle title={collection?.title} image={collection?.image?.url} /> }
44
+        {collection && <PageTitle title={collection?.title} image={collection?.image?.url} />}
45 45
         <ProductList />
46 46
         <SocialMedia />
47
-        <Feature />
47
+        <Box sx={{
48
+          display: {
49
+            xs: "none",
50
+            sm: "none",
51
+            md: "block"
52
+          }
53
+        }}>
54
+          <Feature />
55
+        </Box>
48 56
       </Box>
49 57
     </>
50 58
   )

Načítá se…
Zrušit
Uložit