Yann commited on
Commit
165d4bd
·
1 Parent(s): 22d5503
Files changed (1) hide show
  1. front/src/pages/Home/Home.tsx +14 -4
front/src/pages/Home/Home.tsx CHANGED
@@ -1,5 +1,5 @@
1
 
2
- import { Snackbar, Stack } from '@mui/material';
3
 
4
  import MainContainer from '../../components/Container/MainContainer';
5
 
@@ -8,6 +8,8 @@ import { Box, Card, CardContent, Divider, Typography } from "@mui/material";
8
  import { useNavigate } from "react-router-dom";
9
  import { useState } from 'react';
10
 
 
 
11
  const Home = () => {
12
  const navigate = useNavigate()
13
  const [open, setOpen] = useState(false);
@@ -62,14 +64,17 @@ const Home = () => {
62
  </Box>
63
  </Card>
64
  </Stack>
 
 
65
  <Snackbar
66
  anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
67
  open={open}
68
  onClose={handleClose}
 
69
  message="This feature is not yet available :("
70
- sx={{borderRadius:"200px"}}
71
  style={{borderRadius:"200px"}}
72
- />
 
73
  </Box>
74
  </MainContainer>
75
  </>
@@ -80,6 +85,11 @@ export default Home;
80
 
81
 
82
  export function ExplainText(props: any) {
 
 
 
 
 
83
  return (
84
  <div
85
  style={{
@@ -90,7 +100,7 @@ export function ExplainText(props: any) {
90
  >
91
  <Box
92
  sx={{
93
- width: "50vw",
94
  borderRadius: "20px",
95
  bgcolor: "background.default",
96
  padding: "35px"
 
1
 
2
+ import { Snackbar, Stack, useMediaQuery, useTheme } from '@mui/material';
3
 
4
  import MainContainer from '../../components/Container/MainContainer';
5
 
 
8
  import { useNavigate } from "react-router-dom";
9
  import { useState } from 'react';
10
 
11
+
12
+
13
  const Home = () => {
14
  const navigate = useNavigate()
15
  const [open, setOpen] = useState(false);
 
64
  </Box>
65
  </Card>
66
  </Stack>
67
+ <Box sx={{borderRadius:"200px"}}>
68
+
69
  <Snackbar
70
  anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
71
  open={open}
72
  onClose={handleClose}
73
+ autoHideDuration={35000}
74
  message="This feature is not yet available :("
 
75
  style={{borderRadius:"200px"}}
76
+ />
77
+ </Box>
78
  </Box>
79
  </MainContainer>
80
  </>
 
85
 
86
 
87
  export function ExplainText(props: any) {
88
+
89
+ const theme = useTheme();
90
+ const isSmUp = useMediaQuery(theme.breakpoints.up('md'));
91
+ const isSxUp = useMediaQuery(theme.breakpoints.up('sm'));
92
+
93
  return (
94
  <div
95
  style={{
 
100
  >
101
  <Box
102
  sx={{
103
+ width: !isSxUp ? "100%" : "50vw",
104
  borderRadius: "20px",
105
  bgcolor: "background.default",
106
  padding: "35px"