|
@@ -19,28 +19,309 @@ import {
|
19
|
19
|
IonRow,
|
20
|
20
|
IonCol,
|
21
|
21
|
IonButtons,
|
22
|
|
- IonBackButton
|
|
22
|
+ IonBackButton,
|
|
23
|
+ useIonViewWillEnter,
|
|
24
|
+ IonRadioGroup,
|
|
25
|
+ IonRadio,
|
|
26
|
+ IonIcon,
|
|
27
|
+ IonChip
|
23
|
28
|
} from '@ionic/react';
|
24
|
|
-import React, {useState} from 'react';
|
25
|
|
-//import { Form } from 'react-bootstrap';
|
|
29
|
+import { useParams } from 'react-router';
|
|
30
|
+import React, { useState } from 'react';
|
26
|
31
|
import './Questions.css';
|
27
|
32
|
import EnciclopediaPR from '../assets/EnciclopediaPR.png';
|
28
|
|
-//import RobertoClemente from '../assets/RobertoClemente.jpg';
|
29
|
|
-//import Quizzes from '../data/Quizzes.json';
|
30
|
|
-import QuizForm from '../components/QuizForm';
|
|
33
|
+import RobertoClemente from '../assets/RobertoClemente.jpg';
|
|
34
|
+import { QuizInfo, getQuiz } from '../data/QuizInfo';
|
|
35
|
+import { thumbsDown, thumbsUp } from 'ionicons/icons';
|
31
|
36
|
|
32
|
37
|
|
33
|
38
|
const Questions: React.FC = () => {
|
|
39
|
+ // Estados para respuestas seleccionadas
|
|
40
|
+ const [qres1, setQRes1] = useState();
|
|
41
|
+ const [qres2, setQRes2] = useState();
|
|
42
|
+ const [qres3, setQRes3] = useState();
|
|
43
|
+ const [qres4, setQRes4] = useState();
|
34
|
44
|
|
35
|
|
- const [res1, setRes1] = useState();
|
36
|
|
- const [res2, setRes2] = useState();
|
37
|
|
- const [res3, setRes3] = useState();
|
38
|
|
- const [res4, setRes4] = useState();
|
|
45
|
+ // Arreglos para saber cual radio se selecciono en cada pregunta
|
|
46
|
+ const selected1:boolean[] = [false, false, false, false];
|
|
47
|
+ const selected2:boolean[] = [false, false, false, false];
|
|
48
|
+ const selected3:boolean[] = [false, false, false, false];
|
|
49
|
+ const selected4:boolean[] = [false, false, false, false];
|
39
|
50
|
|
|
51
|
+ // Estados para seleccionar iconos de las respuestas seleccionadas
|
|
52
|
+ const [icon11, setIcon11] = useState<any>();
|
|
53
|
+ const [icon12, setIcon12] = useState<any>();
|
|
54
|
+ const [icon13, setIcon13] = useState<any>();
|
|
55
|
+ const [icon14, setIcon14] = useState<any>();
|
|
56
|
+
|
|
57
|
+ const [icon21, setIcon21] = useState<any>();
|
|
58
|
+ const [icon22, setIcon22] = useState<any>();
|
|
59
|
+ const [icon23, setIcon23] = useState<any>();
|
|
60
|
+ const [icon24, setIcon24] = useState<any>();
|
|
61
|
+
|
|
62
|
+ const [icon31, setIcon31] = useState<any>();
|
|
63
|
+ const [icon32, setIcon32] = useState<any>();
|
|
64
|
+ const [icon33, setIcon33] = useState<any>();
|
|
65
|
+ const [icon34, setIcon34] = useState<any>();
|
|
66
|
+
|
|
67
|
+ const [icon41, setIcon41] = useState<any>();
|
|
68
|
+ const [icon42, setIcon42] = useState<any>();
|
|
69
|
+ const [icon43, setIcon43] = useState<any>();
|
|
70
|
+ const [icon44, setIcon44] = useState<any>();
|
|
71
|
+
|
|
72
|
+ // Estado para contar cuantas preguntas correctas se obtuvieron
|
|
73
|
+ const [countres, setCountRes] = useState<number>(0);
|
|
74
|
+
|
|
75
|
+ const [verResPresionado, setVerResPresionado] = useState<boolean>(false);
|
|
76
|
+
|
|
77
|
+ /* verificarRes()
|
|
78
|
+ Funcion se encarga de verificar si las respuestas seleccionadas
|
|
79
|
+ son correctas. Despliega ThumbsUp para seleccion correcta,
|
|
80
|
+ ThumbsDowmn para seleccion incorrecta.
|
|
81
|
+ */
|
40
|
82
|
const verificarRes = () => {
|
41
|
|
- return console.log([res1, res2, res3, res4])
|
|
83
|
+ // borrar console logs para el release
|
|
84
|
+ console.log([qres1, qres2, qres3, qres4]);
|
|
85
|
+ console.log(countres);
|
|
86
|
+
|
|
87
|
+ // reset a los icons, count y acertadas por si hubo seleccion anterior
|
|
88
|
+ let count = 0;
|
|
89
|
+ setCountRes(count);
|
|
90
|
+ setVerResPresionado(true);
|
|
91
|
+
|
|
92
|
+ setIcon11(null);
|
|
93
|
+ setIcon12(null);
|
|
94
|
+ setIcon13(null);
|
|
95
|
+ setIcon14(null);
|
|
96
|
+
|
|
97
|
+ setIcon21(null);
|
|
98
|
+ setIcon22(null);
|
|
99
|
+ setIcon23(null);
|
|
100
|
+ setIcon24(null);
|
|
101
|
+
|
|
102
|
+ setIcon31(null);
|
|
103
|
+ setIcon32(null);
|
|
104
|
+ setIcon33(null);
|
|
105
|
+ setIcon34(null);
|
|
106
|
+
|
|
107
|
+ setIcon41(null);
|
|
108
|
+ setIcon42(null);
|
|
109
|
+ setIcon43(null);
|
|
110
|
+ setIcon44(null);
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+ // loop para saber que radio escogio el usuario en cada pregunta
|
|
114
|
+ let num: number = 0;
|
|
115
|
+ let i: number;
|
|
116
|
+ for(i = num; i<4; i++){
|
|
117
|
+ if(qres1 === quizInfo?.res1[i]){
|
|
118
|
+ selected1[i] = true;
|
|
119
|
+ }
|
|
120
|
+
|
|
121
|
+ if(qres2 === quizInfo?.res2[i]){
|
|
122
|
+ selected2[i] = true;
|
|
123
|
+ }
|
|
124
|
+
|
|
125
|
+ if(qres3 === quizInfo?.res3[i]){
|
|
126
|
+ selected3[i] = true;
|
|
127
|
+ }
|
|
128
|
+
|
|
129
|
+ if(qres4 === quizInfo?.res4[i]){
|
|
130
|
+ selected4[i] = true;
|
|
131
|
+ }
|
|
132
|
+
|
|
133
|
+ }
|
|
134
|
+
|
|
135
|
+ // Para seleccionar si sale icono correccto o incorrecto en seleccion
|
|
136
|
+ // de radio.
|
|
137
|
+
|
|
138
|
+ // ======================= PREGUNTA 1 =========================================
|
|
139
|
+ // SI usuario seleccionio el primer radio en la pregunta 1
|
|
140
|
+ if(selected1[0] && quizInfo?.res1[0] === quizInfo?.correcta1){
|
|
141
|
+ setIcon11(<IonIcon icon={thumbsUp} />);
|
|
142
|
+ //setCountRes(countres + 1);
|
|
143
|
+ count++;
|
|
144
|
+ }
|
|
145
|
+ else if (selected1[0] && quizInfo?.res1[0] !== quizInfo?.correcta1){
|
|
146
|
+ setIcon11(<IonIcon icon={thumbsDown} />)
|
|
147
|
+ }
|
|
148
|
+
|
|
149
|
+ // SI usuario seleccionio el segundo radio en la pregunta 1
|
|
150
|
+ if(selected1[1] && quizInfo?.res1[1] === quizInfo?.correcta1){
|
|
151
|
+ setIcon12(<IonIcon icon={thumbsUp} />);
|
|
152
|
+ //setCountRes(countres + 1);
|
|
153
|
+ count++;
|
|
154
|
+ }
|
|
155
|
+ else if (selected1[1] && quizInfo?.res1[1] !== quizInfo?.correcta1){
|
|
156
|
+ setIcon12(<IonIcon icon={thumbsDown} />)
|
|
157
|
+ }
|
|
158
|
+
|
|
159
|
+ // SI usuario seleccionio el tercer radio en la pregunta 1
|
|
160
|
+ if(selected1[2] && quizInfo?.res1[2] === quizInfo?.correcta1){
|
|
161
|
+ setIcon13(<IonIcon icon={thumbsUp} />);
|
|
162
|
+ //setCountRes(countres + 1);
|
|
163
|
+ count++;
|
|
164
|
+ }
|
|
165
|
+ else if (selected1[2] && quizInfo?.res1[2] !== quizInfo?.correcta1){
|
|
166
|
+ setIcon13(<IonIcon icon={thumbsDown} />)
|
|
167
|
+ }
|
|
168
|
+
|
|
169
|
+ // SI usuario seleccionio el cuarto radio en la pregunta 1
|
|
170
|
+ if(selected1[3] && quizInfo?.res1[3] === quizInfo?.correcta1){
|
|
171
|
+ setIcon14(<IonIcon icon={thumbsUp} />);
|
|
172
|
+ //setCountRes(countres + 1);
|
|
173
|
+ count++;
|
|
174
|
+ }
|
|
175
|
+ else if (selected1[3] && quizInfo?.res1[3] !== quizInfo?.correcta1){
|
|
176
|
+ setIcon14(<IonIcon icon={thumbsDown} />)
|
|
177
|
+ }
|
|
178
|
+ // ======================= PREGUNTA 1 =========================================
|
|
179
|
+
|
|
180
|
+ // ======================= PREGUNTA 2 =========================================
|
|
181
|
+
|
|
182
|
+ // SI usuario seleccionio el primer radio en la pregunta 2
|
|
183
|
+ if(selected2[0] && quizInfo?.res2[0] === quizInfo?.correcta2){
|
|
184
|
+ setIcon21(<IonIcon icon={thumbsUp} />);
|
|
185
|
+ //setCountRes(countres + 1);
|
|
186
|
+ count++;
|
|
187
|
+ }
|
|
188
|
+ else if (selected2[0] && quizInfo?.res2[0] !== quizInfo?.correcta2){
|
|
189
|
+ setIcon21(<IonIcon icon={thumbsDown} />)
|
|
190
|
+ }
|
|
191
|
+
|
|
192
|
+ // SI usuario seleccionio el segundo radio en la pregunta 2
|
|
193
|
+ if(selected2[1] && quizInfo?.res2[1] === quizInfo?.correcta2){
|
|
194
|
+ setIcon22(<IonIcon icon={thumbsUp} />);
|
|
195
|
+ //setCountRes(countres + 1);
|
|
196
|
+ count++;
|
|
197
|
+ }
|
|
198
|
+ else if (selected2[1] && quizInfo?.res2[1] !== quizInfo?.correcta2){
|
|
199
|
+ setIcon22(<IonIcon icon={thumbsDown} />)
|
|
200
|
+ }
|
|
201
|
+
|
|
202
|
+ // SI usuario seleccionio el tercer radio en la pregunta 2
|
|
203
|
+ if(selected2[2] && quizInfo?.res2[2] === quizInfo?.correcta2){
|
|
204
|
+ setIcon23(<IonIcon icon={thumbsUp} />);
|
|
205
|
+ //setCountRes(countres + 1);
|
|
206
|
+ count++;
|
|
207
|
+ }
|
|
208
|
+ else if (selected2[2] && quizInfo?.res2[2] !== quizInfo?.correcta2){
|
|
209
|
+ setIcon23(<IonIcon icon={thumbsDown} />)
|
|
210
|
+ }
|
|
211
|
+
|
|
212
|
+ // SI usuario seleccionio el cuarto radio en la pregunta 2
|
|
213
|
+ if(selected2[3] && quizInfo?.res2[3] === quizInfo?.correcta2){
|
|
214
|
+ setIcon24(<IonIcon icon={thumbsUp} />);
|
|
215
|
+ //setCountRes(countres + 1);
|
|
216
|
+ count++;
|
|
217
|
+ }
|
|
218
|
+ else if (selected2[3] && quizInfo?.res2[3] !== quizInfo?.correcta2){
|
|
219
|
+ setIcon24(<IonIcon icon={thumbsDown} />)
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ // ======================= PREGUNTA 2 =========================================
|
|
223
|
+
|
|
224
|
+ // ======================= PREGUNTA 3 =========================================
|
|
225
|
+
|
|
226
|
+ // SI usuario seleccionio el primer radio en la pregunta 3
|
|
227
|
+ if(selected3[0] && quizInfo?.res3[0] === quizInfo?.correcta3){
|
|
228
|
+ setIcon31(<IonIcon icon={thumbsUp} />);
|
|
229
|
+ //setCountRes(countres + 1);
|
|
230
|
+ count++;
|
|
231
|
+ }
|
|
232
|
+ else if (selected3[0] && quizInfo?.res3[0] !== quizInfo?.correcta3){
|
|
233
|
+ setIcon31(<IonIcon icon={thumbsDown} />)
|
|
234
|
+ }
|
|
235
|
+
|
|
236
|
+ // SI usuario seleccionio el segundo radio en la pregunta 3
|
|
237
|
+ if(selected3[1] && quizInfo?.res3[1] === quizInfo?.correcta3){
|
|
238
|
+ setIcon32(<IonIcon icon={thumbsUp} />);
|
|
239
|
+ //setCountRes(countres + 1);
|
|
240
|
+ count++;
|
|
241
|
+ }
|
|
242
|
+ else if (selected3[1] && quizInfo?.res3[1] !== quizInfo?.correcta3){
|
|
243
|
+ setIcon32(<IonIcon icon={thumbsDown} />)
|
|
244
|
+ }
|
|
245
|
+
|
|
246
|
+ // SI usuario seleccionio el tercer radio en la pregunta 3
|
|
247
|
+ if(selected3[2] && quizInfo?.res3[2] === quizInfo?.correcta3){
|
|
248
|
+ setIcon33(<IonIcon icon={thumbsUp} />);
|
|
249
|
+ //setCountRes(countres + 1);
|
|
250
|
+ count++;
|
|
251
|
+ }
|
|
252
|
+ else if (selected3[2] && quizInfo?.res3[2] !== quizInfo?.correcta3){
|
|
253
|
+ setIcon33(<IonIcon icon={thumbsDown} />)
|
|
254
|
+ }
|
|
255
|
+
|
|
256
|
+ // SI usuario seleccionio el cuerto radio en la pregunta 3
|
|
257
|
+ if(selected3[3] && quizInfo?.res3[3] === quizInfo?.correcta3){
|
|
258
|
+ setIcon34(<IonIcon icon={thumbsUp} />);
|
|
259
|
+ //setCountRes(countres + 1);
|
|
260
|
+ count++;
|
|
261
|
+ }
|
|
262
|
+ else if (selected3[3] && quizInfo?.res3[3] !== quizInfo?.correcta3){
|
|
263
|
+ setIcon34(<IonIcon icon={thumbsDown} />)
|
|
264
|
+ }
|
|
265
|
+
|
|
266
|
+ // ======================= PREGUNTA 3 =========================================
|
|
267
|
+
|
|
268
|
+ // ======================= PREGUNTA 4 =========================================
|
|
269
|
+
|
|
270
|
+ // SI usuario seleccionio el primer radio en la pregunta 4
|
|
271
|
+ if(selected4[0] && quizInfo?.res4[0] === quizInfo?.correcta4){
|
|
272
|
+ setIcon41(<IonIcon icon={thumbsUp} />);
|
|
273
|
+ //setCountRes(countres + 1);
|
|
274
|
+ count++;
|
|
275
|
+ }
|
|
276
|
+ else if (selected4[0] && quizInfo?.res4[0] !== quizInfo?.correcta4){
|
|
277
|
+ setIcon41(<IonIcon icon={thumbsDown} />)
|
|
278
|
+ }
|
|
279
|
+
|
|
280
|
+ // SI usuario seleccionio el segundo radio en la pregunta 4
|
|
281
|
+ if(selected4[1] && quizInfo?.res4[1] === quizInfo?.correcta4){
|
|
282
|
+ setIcon42(<IonIcon icon={thumbsUp} />);
|
|
283
|
+ //setCountRes(countres + 1);
|
|
284
|
+ count++;
|
|
285
|
+ }
|
|
286
|
+ else if (selected4[1] && quizInfo?.res4[1] !== quizInfo?.correcta4){
|
|
287
|
+ setIcon42(<IonIcon icon={thumbsDown} />)
|
|
288
|
+ }
|
|
289
|
+
|
|
290
|
+ // SI usuario seleccionio el tercer radio en la pregunta 4
|
|
291
|
+ if(selected4[2] && quizInfo?.res4[2] === quizInfo?.correcta4){
|
|
292
|
+ setIcon43(<IonIcon icon={thumbsUp} />);
|
|
293
|
+ //setCountRes(countres + 1);
|
|
294
|
+ count++;
|
|
295
|
+ }
|
|
296
|
+ else if (selected4[2] && quizInfo?.res4[2] !== quizInfo?.correcta4){
|
|
297
|
+ setIcon43(<IonIcon icon={thumbsDown} />)
|
|
298
|
+ }
|
|
299
|
+
|
|
300
|
+ // SI usuario seleccionio el cuarto radio en la pregunta 4
|
|
301
|
+ if(selected4[3] && quizInfo?.res4[3] === quizInfo?.correcta4){
|
|
302
|
+ setIcon44(<IonIcon icon={thumbsUp} />);
|
|
303
|
+ //setCountRes(countres + 1);
|
|
304
|
+ count++;
|
|
305
|
+ }
|
|
306
|
+ else if (selected4[3] && quizInfo?.res4[3] !== quizInfo?.correcta4){
|
|
307
|
+ setIcon44(<IonIcon icon={thumbsDown} />)
|
|
308
|
+ }
|
|
309
|
+
|
|
310
|
+ // ======================= PREGUNTA 4 =========================================
|
|
311
|
+
|
|
312
|
+ // Para saber cueantas resspuestas acertó el usuario
|
|
313
|
+ setCountRes(count);
|
42
|
314
|
};
|
|
315
|
+
|
|
316
|
+ // State para desplegar la info del quiz
|
|
317
|
+ const [quizInfo, setQuiz] = useState<QuizInfo>();
|
|
318
|
+ const params = useParams<{ id: string }>();
|
43
|
319
|
|
|
320
|
+ useIonViewWillEnter(() => {
|
|
321
|
+ const quiz = getQuiz(parseInt(params.id, 10));
|
|
322
|
+ setQuiz(quiz);
|
|
323
|
+ });
|
|
324
|
+
|
44
|
325
|
return (
|
45
|
326
|
<IonPage>
|
46
|
327
|
<IonHeader>
|
|
@@ -57,8 +338,177 @@ const Questions: React.FC = () => {
|
57
|
338
|
</IonGrid>
|
58
|
339
|
</IonToolbar>
|
59
|
340
|
</IonHeader>
|
|
341
|
+
|
|
342
|
+ <IonContent fullscreen className="ion-padding">
|
|
343
|
+ <IonImg style={{ height: 300, width: 600 }} src={RobertoClemente} alt='Logo'></IonImg>
|
|
344
|
+
|
|
345
|
+ {
|
|
346
|
+ quizInfo ?
|
|
347
|
+ <>
|
|
348
|
+ <h1>Quiz sobre la biografia de {quizInfo.title}</h1>
|
|
349
|
+
|
|
350
|
+ <p>Marque una respuesta por pregunta</p>
|
|
351
|
+
|
|
352
|
+ <IonCard>
|
|
353
|
+ <IonCardHeader>
|
|
354
|
+ <IonCardTitle>{quizInfo.pregunta1}</IonCardTitle>
|
|
355
|
+ <IonCardSubtitle></IonCardSubtitle>
|
|
356
|
+ </IonCardHeader>
|
|
357
|
+ <IonCardContent>
|
|
358
|
+ <IonList>
|
|
359
|
+ <IonRadioGroup value={qres1} onIonChange={(e) => setQRes1(e.detail.value)}>
|
|
360
|
+ <IonItem>
|
|
361
|
+ <IonLabel>{quizInfo.res1[0]}</IonLabel>
|
|
362
|
+ <IonRadio slot="end" value={quizInfo.res1[0]}></IonRadio>
|
|
363
|
+ {icon11}
|
|
364
|
+ </IonItem>
|
|
365
|
+
|
|
366
|
+ <IonItem>
|
|
367
|
+ <IonLabel>{quizInfo.res1[1]}</IonLabel>
|
|
368
|
+ <IonRadio slot="end" value={quizInfo.res1[1]}></IonRadio>
|
|
369
|
+ {icon12}
|
|
370
|
+ </IonItem>
|
|
371
|
+
|
|
372
|
+ <IonItem>
|
|
373
|
+ <IonLabel>{quizInfo.res1[2]}</IonLabel>
|
|
374
|
+ <IonRadio slot="end" value={quizInfo.res1[2]}></IonRadio>
|
|
375
|
+ {icon13}
|
|
376
|
+ </IonItem>
|
|
377
|
+
|
|
378
|
+ <IonItem>
|
|
379
|
+ <IonLabel>{quizInfo.res1[3]}</IonLabel>
|
|
380
|
+ <IonRadio slot="end" value={quizInfo.res1[3]}></IonRadio>
|
|
381
|
+ {icon14}
|
|
382
|
+ </IonItem>
|
|
383
|
+ </IonRadioGroup>
|
|
384
|
+ </IonList>
|
|
385
|
+ </IonCardContent>
|
|
386
|
+ </IonCard>
|
|
387
|
+
|
|
388
|
+ <IonCard>
|
|
389
|
+ <IonCardHeader>
|
|
390
|
+ <IonCardTitle>{quizInfo.pregunta2}</IonCardTitle>
|
|
391
|
+ <IonCardSubtitle></IonCardSubtitle>
|
|
392
|
+ </IonCardHeader>
|
|
393
|
+ <IonCardContent>
|
|
394
|
+ <IonList>
|
|
395
|
+ <IonRadioGroup value={qres2} onIonChange={(e) => setQRes2(e.detail.value)}>
|
|
396
|
+ <IonItem>
|
|
397
|
+ <IonLabel>{quizInfo.res2[0]}</IonLabel>
|
|
398
|
+ <IonRadio slot="end" value={quizInfo.res2[0]}></IonRadio>
|
|
399
|
+ {icon21}
|
|
400
|
+ </IonItem>
|
|
401
|
+
|
|
402
|
+ <IonItem>
|
|
403
|
+ <IonLabel>{quizInfo.res2[1]}</IonLabel>
|
|
404
|
+ <IonRadio slot="end" value={quizInfo.res2[1]}></IonRadio>
|
|
405
|
+ {icon22}
|
|
406
|
+ </IonItem>
|
|
407
|
+
|
|
408
|
+ <IonItem>
|
|
409
|
+ <IonLabel>{quizInfo.res2[2]}</IonLabel>
|
|
410
|
+ <IonRadio slot="end" value={quizInfo.res2[2]}></IonRadio>
|
|
411
|
+ {icon23}
|
|
412
|
+ </IonItem>
|
|
413
|
+
|
|
414
|
+ <IonItem>
|
|
415
|
+ <IonLabel>{quizInfo.res2[3]}</IonLabel>
|
|
416
|
+ <IonRadio slot="end" value={quizInfo.res2[3]}></IonRadio>
|
|
417
|
+ {icon24}
|
|
418
|
+ </IonItem>
|
|
419
|
+ </IonRadioGroup>
|
|
420
|
+ </IonList>
|
|
421
|
+ </IonCardContent>
|
|
422
|
+ </IonCard>
|
|
423
|
+
|
|
424
|
+ <IonCard>
|
|
425
|
+ <IonCardHeader>
|
|
426
|
+ <IonCardTitle>{quizInfo.pregunta3}</IonCardTitle>
|
|
427
|
+ <IonCardSubtitle></IonCardSubtitle>
|
|
428
|
+ </IonCardHeader>
|
|
429
|
+ <IonCardContent>
|
|
430
|
+ <IonList>
|
|
431
|
+ <IonRadioGroup value={qres3} onIonChange={(e) => setQRes3(e.detail.value)}>
|
|
432
|
+ <IonItem>
|
|
433
|
+ <IonLabel>{quizInfo.res3[0]}</IonLabel>
|
|
434
|
+ <IonRadio slot="end" value={quizInfo.res3[0]}></IonRadio>
|
|
435
|
+ {icon31}
|
|
436
|
+ </IonItem>
|
|
437
|
+
|
|
438
|
+ <IonItem>
|
|
439
|
+ <IonLabel>{quizInfo.res3[1]}</IonLabel>
|
|
440
|
+ <IonRadio slot="end" value={quizInfo.res3[1]}></IonRadio>
|
|
441
|
+ {icon32}
|
|
442
|
+ </IonItem>
|
|
443
|
+
|
|
444
|
+ <IonItem>
|
|
445
|
+ <IonLabel>{quizInfo.res3[2]}</IonLabel>
|
|
446
|
+ <IonRadio slot="end" value={quizInfo.res3[2]}></IonRadio>
|
|
447
|
+ {icon33}
|
|
448
|
+ </IonItem>
|
|
449
|
+
|
|
450
|
+ <IonItem>
|
|
451
|
+ <IonLabel>{quizInfo.res3[3]}</IonLabel>
|
|
452
|
+ <IonRadio slot="end" value={quizInfo.res3[3]}></IonRadio>
|
|
453
|
+ {icon34}
|
|
454
|
+ </IonItem>
|
|
455
|
+ </IonRadioGroup>
|
|
456
|
+ </IonList>
|
|
457
|
+ </IonCardContent>
|
|
458
|
+ </IonCard>
|
|
459
|
+
|
|
460
|
+ <IonCard>
|
|
461
|
+ <IonCardHeader>
|
|
462
|
+ <IonCardTitle>{quizInfo.pregunta4}</IonCardTitle>
|
|
463
|
+ <IonCardSubtitle></IonCardSubtitle>
|
|
464
|
+ </IonCardHeader>
|
|
465
|
+ <IonCardContent>
|
|
466
|
+ <IonList>
|
|
467
|
+ <IonRadioGroup value={qres4} onIonChange={(e) => setQRes4(e.detail.value)}>
|
|
468
|
+ <IonItem>
|
|
469
|
+ <IonLabel>{quizInfo.res4[0]}</IonLabel>
|
|
470
|
+ <IonRadio slot="end" value={quizInfo.res4[0]}></IonRadio>
|
|
471
|
+ {icon41}
|
|
472
|
+ </IonItem>
|
|
473
|
+
|
|
474
|
+ <IonItem>
|
|
475
|
+ <IonLabel>{quizInfo.res4[1]}</IonLabel>
|
|
476
|
+ <IonRadio slot="end" value={quizInfo.res4[1]}></IonRadio>
|
|
477
|
+ {icon42}
|
|
478
|
+ </IonItem>
|
|
479
|
+
|
|
480
|
+ <IonItem>
|
|
481
|
+ <IonLabel>{quizInfo.res4[2]}</IonLabel>
|
|
482
|
+ <IonRadio slot="end" value={quizInfo.res4[2]}></IonRadio>
|
|
483
|
+ {icon43}
|
|
484
|
+ </IonItem>
|
|
485
|
+
|
|
486
|
+ <IonItem>
|
|
487
|
+ <IonLabel>{quizInfo.res4[3]}</IonLabel>
|
|
488
|
+ <IonRadio slot="end" value={quizInfo.res4[3]}></IonRadio>
|
|
489
|
+ {icon44}
|
|
490
|
+ </IonItem>
|
|
491
|
+ </IonRadioGroup>
|
|
492
|
+ </IonList>
|
|
493
|
+ </IonCardContent>
|
|
494
|
+ </IonCard>
|
|
495
|
+
|
|
496
|
+ <IonItem lines="none">
|
|
497
|
+ {verResPresionado ? (
|
|
498
|
+ <>
|
|
499
|
+ <IonChip>{countres} / 4 respuestas correctas</IonChip>
|
|
500
|
+ </>
|
|
501
|
+ ) : null }
|
|
502
|
+ </IonItem>
|
|
503
|
+
|
|
504
|
+ </> : <div>Quiz not found</div>
|
|
505
|
+
|
|
506
|
+ }
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+ <IonButton onClick={verificarRes}>Verificar respuestas</IonButton>
|
60
|
510
|
|
61
|
|
- {QuizForm(1)}
|
|
511
|
+ </IonContent>
|
62
|
512
|
|
63
|
513
|
<IonFooter>
|
64
|
514
|
<IonToolbar className="Footer-Color">
|