|
@@ -5,18 +5,39 @@ import { Box,Button, LinearProgress, Backdrop, CircularProgress, } from '@mui/ma
|
5
|
5
|
import { useSelector } from 'react-redux';
|
6
|
6
|
import { useParams, useNavigate } from 'react-router-dom'
|
7
|
7
|
import toast, { Toaster } from 'react-hot-toast';
|
|
8
|
+import { createTheme, ThemeProvider } from '@mui/material/styles';
|
8
|
9
|
|
9
|
10
|
|
10
|
11
|
function LinearProgressWithLabel(props) {
|
11
|
12
|
return (
|
12
|
13
|
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
13
|
14
|
<Box sx={{ width: '100%', mr: 0 }}>
|
14
|
|
- <LinearProgress variant="determinate" {...props} />
|
|
15
|
+ <LinearProgress color="primary" variant="determinate" {...props} />
|
15
|
16
|
</Box>
|
16
|
17
|
</Box>
|
17
|
18
|
);
|
18
|
19
|
}
|
19
|
20
|
|
|
21
|
+const theme = createTheme({
|
|
22
|
+ status: {
|
|
23
|
+ danger: '#e53e3e',
|
|
24
|
+ },
|
|
25
|
+ palette: {
|
|
26
|
+ primary: {
|
|
27
|
+ main: '#fd4b4b',
|
|
28
|
+ darker: '#053e85',
|
|
29
|
+ },
|
|
30
|
+ secondary : {
|
|
31
|
+ main: '#2ec5d3',
|
|
32
|
+ darker: '#053e85',
|
|
33
|
+ },
|
|
34
|
+ neutral: {
|
|
35
|
+ main: '#64748B',
|
|
36
|
+ contrastText: '#fff',
|
|
37
|
+ },
|
|
38
|
+ },
|
|
39
|
+});
|
|
40
|
+
|
20
|
41
|
export function Cleaver() {
|
21
|
42
|
|
22
|
43
|
let { id } = useParams();
|
|
@@ -122,25 +143,25 @@ export function Cleaver() {
|
122
|
143
|
|
123
|
144
|
|
124
|
145
|
return (
|
125
|
|
- <div>
|
126
|
|
- <div className="content-section question">
|
127
|
|
- <div style={{width:'60%', marginBottom : 35}}>
|
128
|
|
- <LinearProgressWithLabel value={progress ? parseInt(progress) : 0 } />
|
129
|
|
- </div>
|
130
|
|
- <Box className="question_body">
|
131
|
|
- {totalRespondidas.map((item,i) => (
|
132
|
|
- <Question
|
133
|
|
- key={item.id}
|
134
|
|
- id={item.id}
|
135
|
|
- quiz={item}
|
136
|
|
- index={i}
|
137
|
|
- current={current}
|
138
|
|
- />)
|
139
|
|
- )}
|
140
|
|
- </Box>
|
141
|
|
-
|
142
|
|
- {
|
143
|
|
- totalPreguntas.length > 0 ?
|
|
146
|
+ <ThemeProvider theme={theme}>
|
|
147
|
+ <div className="content-section question">
|
|
148
|
+ <div style={{marginTop : 35}}>
|
|
149
|
+ <LinearProgressWithLabel value={progress ? parseInt(progress) : 0 } />
|
|
150
|
+ </div>
|
|
151
|
+ <Box className="question_body">
|
|
152
|
+ {totalRespondidas.map((item,i) => (
|
|
153
|
+ <Question
|
|
154
|
+ key={item.id}
|
|
155
|
+ id={item.id}
|
|
156
|
+ quiz={item}
|
|
157
|
+ index={i}
|
|
158
|
+ current={current}
|
|
159
|
+ />)
|
|
160
|
+ )}
|
|
161
|
+ </Box>
|
|
162
|
+
|
|
163
|
+ {
|
|
164
|
+ totalPreguntas.length > 0 ?
|
144
|
165
|
(
|
145
|
166
|
<div className="question_btn">
|
146
|
167
|
<Button
|
|
@@ -175,18 +196,18 @@ export function Cleaver() {
|
175
|
196
|
</Button>
|
176
|
197
|
</div>
|
177
|
198
|
)
|
178
|
|
-
|
|
199
|
+
|
179
|
200
|
}
|
180
|
|
- <Toaster position="bottom-right" />
|
181
|
|
- <Backdrop
|
182
|
|
- sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
183
|
|
- open={open}
|
184
|
|
- // onClick={()}
|
185
|
|
- >
|
186
|
|
- <CircularProgress color="inherit" />
|
187
|
|
- </Backdrop>
|
188
|
|
- </div>
|
189
|
|
- </div>
|
|
201
|
+ <Toaster position="bottom-right" />
|
|
202
|
+ <Backdrop
|
|
203
|
+ sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
|
204
|
+ open={open}
|
|
205
|
+ // onClick={()}
|
|
206
|
+ >
|
|
207
|
+ <CircularProgress color="inherit" />
|
|
208
|
+ </Backdrop>
|
|
209
|
+ </div>
|
|
210
|
+ </ThemeProvider>
|
190
|
211
|
)
|
191
|
212
|
|
192
|
213
|
}
|