Browse Source

Modification to List

Alex Ortiz 1 year ago
parent
commit
f003ebfbe4
9 changed files with 901 additions and 134 deletions
  1. 187
    0
      package-lock.json
  2. 2
    0
      package.json
  3. 1
    1
      src/App.tsx
  4. 27
    0
      src/data/QuizInfo.ts
  5. 191
    0
      src/data/Quizzes.json
  6. 6
    1
      src/pages/Biography.tsx
  7. 3
    3
      src/pages/ListBiographies.tsx
  8. 20
    0
      src/pages/Questions.css
  9. 464
    129
      src/pages/Questions.tsx

+ 187
- 0
package-lock.json View File

@@ -24,9 +24,11 @@
24 24
         "@types/react-dom": "^18.0.6",
25 25
         "@types/react-router": "^5.1.11",
26 26
         "@types/react-router-dom": "^5.1.7",
27
+        "bootstrap": "^5.2.3",
27 28
         "history": "^4.9.0",
28 29
         "ionicons": "^6.0.3",
29 30
         "react": "^18.2.0",
31
+        "react-bootstrap": "^2.7.0",
30 32
         "react-dom": "^18.2.0",
31 33
         "react-router": "^5.2.0",
32 34
         "react-router-dom": "^5.2.0",
@@ -3488,6 +3490,57 @@
3488 3490
         }
3489 3491
       }
3490 3492
     },
3493
+    "node_modules/@popperjs/core": {
3494
+      "version": "2.11.6",
3495
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
3496
+      "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
3497
+      "funding": {
3498
+        "type": "opencollective",
3499
+        "url": "https://opencollective.com/popperjs"
3500
+      }
3501
+    },
3502
+    "node_modules/@react-aria/ssr": {
3503
+      "version": "3.4.0",
3504
+      "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.4.0.tgz",
3505
+      "integrity": "sha512-qzuGk14/fUyUAoW/EBwgFcuMkVNXJVGlezTgZ1HovpCZ+p9844E7MUFHE7CuzFzPEIkVeqhBNIoIu+VJJ8YCOA==",
3506
+      "dependencies": {
3507
+        "@babel/runtime": "^7.6.2"
3508
+      },
3509
+      "peerDependencies": {
3510
+        "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
3511
+      }
3512
+    },
3513
+    "node_modules/@restart/hooks": {
3514
+      "version": "0.4.7",
3515
+      "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.7.tgz",
3516
+      "integrity": "sha512-ZbjlEHcG+FQtpDPHd7i4FzNNvJf2enAwZfJbpM8CW7BhmOAbsHpZe3tsHwfQUrBuyrxWqPYp2x5UMnilWcY22A==",
3517
+      "dependencies": {
3518
+        "dequal": "^2.0.2"
3519
+      },
3520
+      "peerDependencies": {
3521
+        "react": ">=16.8.0"
3522
+      }
3523
+    },
3524
+    "node_modules/@restart/ui": {
3525
+      "version": "1.4.1",
3526
+      "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.4.1.tgz",
3527
+      "integrity": "sha512-J7wFOx2DcmkBqCqiZgDsggLO7faiNh4Nv1/v80FmbRgP+MYpwaVDKKXLC69DA4+ejgNIsBP5ORtC74EZqO1j8A==",
3528
+      "dependencies": {
3529
+        "@babel/runtime": "^7.18.3",
3530
+        "@popperjs/core": "^2.11.5",
3531
+        "@react-aria/ssr": "^3.2.0",
3532
+        "@restart/hooks": "^0.4.7",
3533
+        "@types/warning": "^3.0.0",
3534
+        "dequal": "^2.0.2",
3535
+        "dom-helpers": "^5.2.0",
3536
+        "uncontrollable": "^7.2.1",
3537
+        "warning": "^4.0.3"
3538
+      },
3539
+      "peerDependencies": {
3540
+        "react": ">=16.14.0",
3541
+        "react-dom": ">=16.14.0"
3542
+      }
3543
+    },
3491 3544
     "node_modules/@rollup/plugin-babel": {
3492 3545
       "version": "5.3.1",
3493 3546
       "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@@ -4253,6 +4306,14 @@
4253 4306
         "@types/react-router": "*"
4254 4307
       }
4255 4308
     },
4309
+    "node_modules/@types/react-transition-group": {
4310
+      "version": "4.4.5",
4311
+      "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz",
4312
+      "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==",
4313
+      "dependencies": {
4314
+        "@types/react": "*"
4315
+      }
4316
+    },
4256 4317
     "node_modules/@types/resolve": {
4257 4318
       "version": "1.17.1",
4258 4319
       "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz",
@@ -4333,6 +4394,11 @@
4333 4394
       "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==",
4334 4395
       "dev": true
4335 4396
     },
4397
+    "node_modules/@types/warning": {
4398
+      "version": "3.0.0",
4399
+      "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz",
4400
+      "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA=="
4401
+    },
4336 4402
     "node_modules/@types/ws": {
4337 4403
       "version": "8.5.3",
4338 4404
       "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
@@ -5629,6 +5695,24 @@
5629 5695
       "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
5630 5696
       "dev": true
5631 5697
     },
5698
+    "node_modules/bootstrap": {
5699
+      "version": "5.2.3",
5700
+      "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz",
5701
+      "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==",
5702
+      "funding": [
5703
+        {
5704
+          "type": "github",
5705
+          "url": "https://github.com/sponsors/twbs"
5706
+        },
5707
+        {
5708
+          "type": "opencollective",
5709
+          "url": "https://opencollective.com/bootstrap"
5710
+        }
5711
+      ],
5712
+      "peerDependencies": {
5713
+        "@popperjs/core": "^2.11.6"
5714
+      }
5715
+    },
5632 5716
     "node_modules/bplist-parser": {
5633 5717
       "version": "0.3.2",
5634 5718
       "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.2.tgz",
@@ -5933,6 +6017,11 @@
5933 6017
       "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==",
5934 6018
       "dev": true
5935 6019
     },
6020
+    "node_modules/classnames": {
6021
+      "version": "2.3.2",
6022
+      "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
6023
+      "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
6024
+    },
5936 6025
     "node_modules/clean-css": {
5937 6026
       "version": "5.3.1",
5938 6027
       "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.1.tgz",
@@ -6899,6 +6988,14 @@
6899 6988
         "node": ">= 0.8"
6900 6989
       }
6901 6990
     },
6991
+    "node_modules/dequal": {
6992
+      "version": "2.0.3",
6993
+      "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
6994
+      "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
6995
+      "engines": {
6996
+        "node": ">=6"
6997
+      }
6998
+    },
6902 6999
     "node_modules/destroy": {
6903 7000
       "version": "1.2.0",
6904 7001
       "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
@@ -7049,6 +7146,15 @@
7049 7146
         "utila": "~0.4"
7050 7147
       }
7051 7148
     },
7149
+    "node_modules/dom-helpers": {
7150
+      "version": "5.2.1",
7151
+      "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
7152
+      "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
7153
+      "dependencies": {
7154
+        "@babel/runtime": "^7.8.7",
7155
+        "csstype": "^3.0.2"
7156
+      }
7157
+    },
7052 7158
     "node_modules/dom-serializer": {
7053 7159
       "version": "1.4.1",
7054 7160
       "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
@@ -9546,6 +9652,14 @@
9546 9652
         "node": ">= 0.4"
9547 9653
       }
9548 9654
     },
9655
+    "node_modules/invariant": {
9656
+      "version": "2.2.4",
9657
+      "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
9658
+      "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
9659
+      "dependencies": {
9660
+        "loose-envify": "^1.0.0"
9661
+      }
9662
+    },
9549 9663
     "node_modules/ionicons": {
9550 9664
       "version": "6.0.4",
9551 9665
       "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
@@ -14324,6 +14438,23 @@
14324 14438
         "react-is": "^16.13.1"
14325 14439
       }
14326 14440
     },
14441
+    "node_modules/prop-types-extra": {
14442
+      "version": "1.1.1",
14443
+      "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz",
14444
+      "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==",
14445
+      "dependencies": {
14446
+        "react-is": "^16.3.2",
14447
+        "warning": "^4.0.0"
14448
+      },
14449
+      "peerDependencies": {
14450
+        "react": ">=0.14.0"
14451
+      }
14452
+    },
14453
+    "node_modules/prop-types-extra/node_modules/react-is": {
14454
+      "version": "16.13.1",
14455
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
14456
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
14457
+    },
14327 14458
     "node_modules/prop-types/node_modules/react-is": {
14328 14459
       "version": "16.13.1",
14329 14460
       "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
@@ -14490,6 +14621,35 @@
14490 14621
         "node": ">=14"
14491 14622
       }
14492 14623
     },
14624
+    "node_modules/react-bootstrap": {
14625
+      "version": "2.7.0",
14626
+      "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.7.0.tgz",
14627
+      "integrity": "sha512-Jcrn6aUuRVBeSB6dzKODKZU1TONOdhAxu0IDm4Sv74SJUm98dMdhSotF2SNvFEADANoR+stV+7TK6SNX1wWu5w==",
14628
+      "dependencies": {
14629
+        "@babel/runtime": "^7.17.2",
14630
+        "@restart/hooks": "^0.4.6",
14631
+        "@restart/ui": "^1.4.1",
14632
+        "@types/react-transition-group": "^4.4.4",
14633
+        "classnames": "^2.3.1",
14634
+        "dom-helpers": "^5.2.1",
14635
+        "invariant": "^2.2.4",
14636
+        "prop-types": "^15.8.1",
14637
+        "prop-types-extra": "^1.1.0",
14638
+        "react-transition-group": "^4.4.2",
14639
+        "uncontrollable": "^7.2.1",
14640
+        "warning": "^4.0.3"
14641
+      },
14642
+      "peerDependencies": {
14643
+        "@types/react": ">=16.14.8",
14644
+        "react": ">=16.14.0",
14645
+        "react-dom": ">=16.14.0"
14646
+      },
14647
+      "peerDependenciesMeta": {
14648
+        "@types/react": {
14649
+          "optional": true
14650
+        }
14651
+      }
14652
+    },
14493 14653
     "node_modules/react-dev-utils": {
14494 14654
       "version": "12.0.1",
14495 14655
       "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz",
@@ -14569,6 +14729,11 @@
14569 14729
       "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
14570 14730
       "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
14571 14731
     },
14732
+    "node_modules/react-lifecycles-compat": {
14733
+      "version": "3.0.4",
14734
+      "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
14735
+      "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
14736
+    },
14572 14737
     "node_modules/react-refresh": {
14573 14738
       "version": "0.11.0",
14574 14739
       "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
@@ -16617,6 +16782,20 @@
16617 16782
         "url": "https://github.com/sponsors/ljharb"
16618 16783
       }
16619 16784
     },
16785
+    "node_modules/uncontrollable": {
16786
+      "version": "7.2.1",
16787
+      "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz",
16788
+      "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==",
16789
+      "dependencies": {
16790
+        "@babel/runtime": "^7.6.3",
16791
+        "@types/react": ">=16.9.11",
16792
+        "invariant": "^2.2.4",
16793
+        "react-lifecycles-compat": "^3.0.4"
16794
+      },
16795
+      "peerDependencies": {
16796
+        "react": ">=15.0.0"
16797
+      }
16798
+    },
16620 16799
     "node_modules/unicode-canonical-property-names-ecmascript": {
16621 16800
       "version": "2.0.0",
16622 16801
       "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -16861,6 +17040,14 @@
16861 17040
         "makeerror": "1.0.12"
16862 17041
       }
16863 17042
     },
17043
+    "node_modules/warning": {
17044
+      "version": "4.0.3",
17045
+      "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
17046
+      "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
17047
+      "dependencies": {
17048
+        "loose-envify": "^1.0.0"
17049
+      }
17050
+    },
16864 17051
     "node_modules/watchpack": {
16865 17052
       "version": "2.4.0",
16866 17053
       "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",

+ 2
- 0
package.json View File

@@ -19,9 +19,11 @@
19 19
     "@types/react-dom": "^18.0.6",
20 20
     "@types/react-router": "^5.1.11",
21 21
     "@types/react-router-dom": "^5.1.7",
22
+    "bootstrap": "^5.2.3",
22 23
     "history": "^4.9.0",
23 24
     "ionicons": "^6.0.3",
24 25
     "react": "^18.2.0",
26
+    "react-bootstrap": "^2.7.0",
25 27
     "react-dom": "^18.2.0",
26 28
     "react-router": "^5.2.0",
27 29
     "react-router-dom": "^5.2.0",

+ 1
- 1
src/App.tsx View File

@@ -54,7 +54,7 @@ const App: React.FC = () => (
54 54
         <Route path="/Capsule/:id">
55 55
           <Capsule />
56 56
         </Route>
57
-        <Route path="/Question">
57
+        <Route path="/Question/:id">
58 58
           <Questions />
59 59
         </Route>
60 60
         <Route path="/About">

+ 27
- 0
src/data/QuizInfo.ts View File

@@ -0,0 +1,27 @@
1
+import Quizzes from '../data/Quizzes.json';
2
+
3
+export interface QuizInfo {
4
+    id: number;
5
+    title: string;
6
+
7
+    pregunta1: string;
8
+    res1: string[];
9
+    correcta1: string;
10
+
11
+    pregunta2: string;
12
+    res2: string[];
13
+    correcta2: string;
14
+
15
+    pregunta3: string;
16
+    res3: string[];
17
+    correcta3: string;
18
+
19
+    pregunta4: string;
20
+    res4: string[];
21
+    correcta4: string;
22
+
23
+}
24
+
25
+export const getQuizzes = () => Quizzes;
26
+
27
+export const getQuiz = (id: number) => Quizzes.find(m => m.id === id);

+ 191
- 0
src/data/Quizzes.json View File

@@ -0,0 +1,191 @@
1
+[
2
+    {
3
+        "id": 1,
4
+        "title": "Roberto Clemente",
5
+
6
+        "pregunta1": "¿En que año nació Roberto Clemente?",
7
+        "res1":["1934","1950","1943","2022"],
8
+        "correcta1":"1934",
9
+
10
+        "pregunta2": "¿En que pueblo se crió?",
11
+        "res2": ["Caguas","Cabo Rojo","Luquillo","Carolina"],
12
+        "correcta2":"Carolina",
13
+
14
+        "pregunta3": "¿Para qué equipo de la liga de beisbol profesional de Puerto Rico jugó?",
15
+        "res3": ["Bacalaos de Fajardo","Alcapurrias de Loiza","Cangrejeros de Santurce","Brujos de Guayama"],
16
+        "correcta3":"Cangrejeros de Santurce",
17
+
18
+        "pregunta4": "¿Para que equipo de la MLB jugó?",
19
+        "res4": ["New York Yankees","Houston Astros","Chicago Cubs","Pittsburgh Pirates"],
20
+        "correcta4":"Pittsburgh Pirates"
21
+
22
+    },
23
+    {
24
+        "id":2,
25
+        "title": "Rebekah Colberg Cabrera",
26
+        
27
+        "pregunta1": "¿En que año nació Rebekah Colberg Cabrera?",
28
+        "res1": ["11","12","13","14"],
29
+        "correcta1":"11",
30
+
31
+        "pregunta2": "¿En que año nació Rebekah Colberg Cabrera?",
32
+        "res2": ["21","22","23","24"],
33
+        "correcta2":"22",
34
+
35
+        "pregunta3": "¿En que año nació Rebekah Colberg Cabrera3",
36
+        "res3": ["31","32","33","34"],
37
+        "correcta3":"33",
38
+
39
+        "pregunta4": "¿En que año nació Rebekah Colberg Cabrera4",
40
+        "res4": ["41","42","43","44"],
41
+        "correcta4":"44"
42
+
43
+    }
44
+    ,
45
+    {
46
+        "id":3,
47
+        "title": "German Rieckhoff Sampoyo",
48
+
49
+        "pregunta1": "¿En que año nació German Rieckhoff Sampoyo1?",
50
+        "res1": ["11","12","13","14"],
51
+        "correcta1":"11",
52
+
53
+        "pregunta2": "¿En que año nació German Rieckhoff Sampoyo2?",
54
+        "res2": ["21","22","23","24"],
55
+        "correcta2":"22",
56
+
57
+        "pregunta3": "¿En que año nació German Rieckhoff Sampoyo3",
58
+        "res3": ["31","32","33","34"],
59
+        "correcta3":"33",
60
+
61
+        "pregunta4": "¿En que año nació German Rieckhoff Sampoyo4",
62
+        "res4": ["41","42","43","44"],
63
+        "correcta4":"44"
64
+    }
65
+    ,
66
+    {
67
+        "id":4,
68
+        "title": "Narciso Figueroa Sanabria",
69
+
70
+        "pregunta1": "Narciso1",
71
+        "res1": ["11","12","13","14"],
72
+        "correcta1":"11",
73
+
74
+        "pregunta2": "Narciso2",
75
+        "res2": ["21","22","23","24"],
76
+        "correcta2":"22",
77
+
78
+        "pregunta3": "Narciso3",
79
+        "res3": ["31","32","33","34"],
80
+        "correcta3":"33",
81
+
82
+        "pregunta4": "Narciso4",
83
+        "res4": ["41","42","43","44"],
84
+        "correcta4":"44"
85
+    }
86
+    ,
87
+    {
88
+        "id":5,
89
+        "title": "Angelina Figueroa Sanabria",
90
+
91
+        "pregunta1": "Angelina1",
92
+        "res1": ["11","12","13","14"],
93
+        "correcta1":"11",
94
+
95
+        "pregunta2": "Angelina2",
96
+        "res2": ["21","22","23","24"],
97
+        "correcta2":"22",
98
+
99
+        "pregunta3": "Angelina3",
100
+        "res3": ["31","32","33","34"],
101
+        "correcta3":"33",
102
+
103
+        "pregunta4": "Angelina4",
104
+        "res4": ["41","42","43","44"],
105
+        "correcta4":"44"
106
+    }
107
+    ,
108
+    {
109
+        "id":6,
110
+        "title": "Leonor Figueroa Sanabria",
111
+
112
+        "pregunta1": "Leonor1",
113
+        "res1": ["11","12","13","14"],
114
+        "correcta1":"11",
115
+
116
+        "pregunta2": "Leonor2",
117
+        "res2": ["21","22","23","24"],
118
+        "correcta2":"22",
119
+
120
+        "pregunta3": "Leonor3",
121
+        "res3": ["31","32","33","34"],
122
+        "correcta3":"33",
123
+
124
+        "pregunta4": "Leonor4",
125
+        "res4": ["41","42","43","44"],
126
+        "correcta4":"44"
127
+    }
128
+    ,
129
+    {
130
+        "id":7,
131
+        "title": "Ruth Fernández Cortada",
132
+
133
+        "pregunta1": "Ruth1",
134
+        "res1": ["11","12","13","14"],
135
+        "correcta1":"11",
136
+
137
+        "pregunta2": "Ruth2",
138
+        "res2": ["21","22","23","24"],
139
+        "correcta2":"22",
140
+
141
+        "pregunta3": "Ruth3",
142
+        "res3": ["31","32","33","34"],
143
+        "correcta3":"33",
144
+
145
+        "pregunta4": "Ruth4",
146
+        "res4": ["41","42","43","44"],
147
+        "correcta4":"44"
148
+    }
149
+    ,
150
+    {
151
+        "id":8,
152
+        "title": "Sylvia Rexach González",
153
+
154
+        "pregunta1": "Sylvia1",
155
+        "res1": ["11","12","13","14"],
156
+        "correcta1":"11",
157
+
158
+        "pregunta2": "Sylvia2",
159
+        "res2": ["21","22","23","24"],
160
+        "correcta2":"22",
161
+
162
+        "pregunta3": "Sylvia3",
163
+        "res3": ["31","32","33","34"],
164
+        "correcta3":"33",
165
+
166
+        "pregunta4": "Sylvia4",
167
+        "res4": ["41","42","43","44"],
168
+        "correcta4":"44"
169
+    }
170
+    ,
171
+    {
172
+        "id":9,
173
+        "title": "Luz Esther Benítez",
174
+
175
+        "pregunta1": "Luz1",
176
+        "res1": ["11","12","13","14"],
177
+        "correcta1":"11",
178
+
179
+        "pregunta2": "Luz2",
180
+        "res2": ["21","22","23","24"],
181
+        "correcta2":"22",
182
+
183
+        "pregunta3": "Luz3",
184
+        "res3": ["31","32","33","34"],
185
+        "correcta3":"33",
186
+
187
+        "pregunta4": "Luz4",
188
+        "res4": ["41","42","43","44"],
189
+        "correcta4":"44"
190
+    }
191
+]

+ 6
- 1
src/pages/Biography.tsx View File

@@ -21,7 +21,7 @@ import { BioInfo, getMessage } from '../data/BioInfo';
21 21
 import './Biography.css';
22 22
 import EnciclopediaPR from '../assets/EnciclopediaPR.png';
23 23
 import RobertoClemente from '../assets/RobertoClemente.jpg';
24
-import { square } from 'ionicons/icons';
24
+import { clipboardOutline } from 'ionicons/icons';
25 25
 
26 26
 const Biography: React.FC = () => {
27 27
     const [bioinfo, setMessage] = useState<BioInfo>();
@@ -63,6 +63,7 @@ const Biography: React.FC = () => {
63 63
                         </IonItem>
64 64
                         <p>{bioinfo.Text1}</p>
65 65
                         <p>{bioinfo.Text2}</p>
66
+<<<<<<< HEAD
66 67
                         <p>{bioinfo.Text3}</p>
67 68
                         <p>{bioinfo.Text4}</p>
68 69
                         <p>{bioinfo.Text5}</p>
@@ -75,6 +76,10 @@ const Biography: React.FC = () => {
75 76
                         <p> </p>
76 77
                         <IonItem routerLink={`/Question`} detail={true}>
77 78
                             <IonIcon icon={square} />Tomar quiz
79
+=======
80
+                        <IonItem routerLink={`/Question/${bioinfo.id}`} detail={true}>
81
+                            <IonIcon icon={clipboardOutline} />Tomar quiz
82
+>>>>>>> 649fe9bb4c20a7971dad4ef1f02ae2169dc8b438
78 83
                         </IonItem>
79 84
                     </>
80 85
                 ) : (

+ 3
- 3
src/pages/ListBiographies.tsx View File

@@ -21,7 +21,7 @@ import {
21 21
   IonIcon
22 22
 } from '@ionic/react';
23 23
 import './ListBiographies.css';
24
-import { square } from 'ionicons/icons';
24
+import { clipboardOutline } from 'ionicons/icons';
25 25
 import EnciclopediaPR from '../assets/EnciclopediaPR.png';
26 26
 import RobertoClemente from '../assets/RobertoClemente.jpg';
27 27
 import ListBio from '../data/Biograph.json';
@@ -59,8 +59,8 @@ const ListBiographies: React.FC = () => {
59 59
                       {listbio.content}
60 60
                     </IonCardContent>
61 61
                   </IonItem>
62
-                  <IonItem routerLink={`/Question`} detail={true}>
63
-                    <IonIcon icon={square} />Tomar quiz
62
+                  <IonItem routerLink={`/Question/${listbio.id}`} detail={true}>
63
+                    <IonIcon icon={clipboardOutline} />Tomar quiz
64 64
                   </IonItem>
65 65
                 </IonCard>
66 66
               </>

+ 20
- 0
src/pages/Questions.css View File

@@ -26,4 +26,24 @@ ion-col {
26 26
 
27 27
 .Footer-Color {
28 28
     --background: #d3d3d3;
29
+}
30
+
31
+ion-radio {
32
+    --border-radius: 4px;
33
+    --inner-border-radius: 4px;
34
+  
35
+    --color: rgb(110, 110, 110);
36
+    --color-checked: #5abae0;
37
+}
38
+
39
+ion-radio.ios {
40
+    width: 20px;
41
+    height: 20px;
42
+
43
+    border: 2px solid rgb(110, 110, 110);
44
+    border-radius: 4px;
45
+}
46
+
47
+.radio-checked.ios {
48
+    border-color: #5abae0;
29 49
 }

+ 464
- 129
src/pages/Questions.tsx View File

@@ -9,7 +9,6 @@ import {
9 9
     IonItem,
10 10
     IonLabel,
11 11
     IonList,
12
-    IonCheckbox,
13 12
     IonCard,
14 13
     IonCardContent,
15 14
     IonCardHeader,
@@ -20,14 +19,309 @@ import {
20 19
     IonRow,
21 20
     IonCol,
22 21
     IonButtons,
23
-    IonBackButton
22
+    IonBackButton,
23
+    useIonViewWillEnter,
24
+    IonRadioGroup,
25
+    IonRadio,
26
+    IonIcon,
27
+    IonChip
24 28
 } from '@ionic/react';
25
-import React from 'react';
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 33
 import RobertoClemente from '../assets/RobertoClemente.jpg';
34
+import { QuizInfo, getQuiz } from '../data/QuizInfo';
35
+import { thumbsDown, thumbsUp } from 'ionicons/icons';
36
+
29 37
 
30 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();
44
+
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];
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
+    */
82
+    const verificarRes = () => {
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 por si hubo seleccion anterior
88
+        let count = 0;
89
+        setCountRes(count);
90
+        setVerResPresionado(true); // buton verificar respuestas precionado
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);
314
+    };
315
+    
316
+    // State para desplegar la info del quiz
317
+    const [quizInfo, setQuiz] = useState<QuizInfo>();
318
+    const params = useParams<{ id: string }>();
319
+
320
+    useIonViewWillEnter(() => {
321
+        const quiz = getQuiz(parseInt(params.id, 10));
322
+        setQuiz(quiz);
323
+    });
324
+    
31 325
     return (
32 326
         <IonPage>
33 327
             <IonHeader>
@@ -44,134 +338,175 @@ const Questions: React.FC = () => {
44 338
                     </IonGrid>
45 339
                 </IonToolbar>
46 340
             </IonHeader>
47
-
341
+            
48 342
             <IonContent fullscreen className="ion-padding">
49 343
                 <IonImg style={{ height: 300, width: 600 }} src={RobertoClemente} alt='Logo'></IonImg>
50
-                <h1>Quiz sobre la biografia de Roberto Clemente</h1>
51
-
52
-                <p>Marque una respuesta por pregunta</p>
53
-
54
-                <IonCard>
55
-                    <IonCardHeader>
56
-                        <IonCardTitle>¿En que año nació Roberto Clemente?</IonCardTitle>
57
-                        <IonCardSubtitle></IonCardSubtitle>
58
-                    </IonCardHeader>
59
-                    <IonCardContent>
60
-                        <IonList>
61
-                            <IonItem>
62
-                                <IonCheckbox slot="start"></IonCheckbox>
63
-                                <IonLabel>1934</IonLabel>
64
-                            </IonItem>
65
-
66
-                            <IonItem>
67
-                                <IonCheckbox slot="start"></IonCheckbox>
68
-                                <IonLabel>1950</IonLabel>
69
-                            </IonItem>
70
-
71
-                            <IonItem>
72
-                                <IonCheckbox slot="start"></IonCheckbox>
73
-                                <IonLabel>1943</IonLabel>
74
-                            </IonItem>
75
-
76
-                            <IonItem>
77
-                                <IonCheckbox slot="start"></IonCheckbox>
78
-                                <IonLabel>2022</IonLabel>
79
-                            </IonItem>
80
-                        </IonList>
81
-                    </IonCardContent>
82
-                </IonCard>
83
-
84
-                <IonCard>
85
-                    <IonCardHeader>
86
-                        <IonCardTitle>¿En que pueblo se crió?</IonCardTitle>
87
-
88
-                    </IonCardHeader>
89
-                    <IonCardContent>
90
-                        <IonList>
91
-                            <IonItem>
92
-                                <IonCheckbox slot="start"></IonCheckbox>
93
-                                <IonLabel>Caguas</IonLabel>
94
-                            </IonItem>
95
-
96
-                            <IonItem>
97
-                                <IonCheckbox slot="start"></IonCheckbox>
98
-                                <IonLabel>Cabo Rojo</IonLabel>
99
-                            </IonItem>
100
-
101
-                            <IonItem>
102
-                                <IonCheckbox slot="start"></IonCheckbox>
103
-                                <IonLabel>Luquillo</IonLabel>
104
-                            </IonItem>
105
-
106
-                            <IonItem>
107
-                                <IonCheckbox slot="start"></IonCheckbox>
108
-                                <IonLabel>Carolina</IonLabel>
109
-                            </IonItem>
110
-                        </IonList>
111
-                    </IonCardContent>
112
-                </IonCard>
113
-
114
-                <IonCard>
115
-                    <IonCardHeader>
116
-                        <IonCardTitle>¿Para qué equipo de la liga de beisbol profesional de Puerto Rico jugó?</IonCardTitle>
117
-
118
-                    </IonCardHeader>
119
-                    <IonCardContent>
120
-                        <IonList>
121
-                            <IonItem>
122
-                                <IonCheckbox slot="start"></IonCheckbox>
123
-                                <IonLabel>Bacalaos de Fajardo</IonLabel>
124
-                            </IonItem>
125
-
126
-                            <IonItem>
127
-                                <IonCheckbox slot="start"></IonCheckbox>
128
-                                <IonLabel>Alcapurrias de Loiza</IonLabel>
129
-                            </IonItem>
130
-
131
-                            <IonItem>
132
-                                <IonCheckbox slot="start"></IonCheckbox>
133
-                                <IonLabel>Cangrejeros de Santurce</IonLabel>
134
-                            </IonItem>
135
-
136
-                            <IonItem>
137
-                                <IonCheckbox slot="start"></IonCheckbox>
138
-                                <IonLabel>Brujos de Guayama</IonLabel>
139
-                            </IonItem>
140
-                        </IonList>
141
-                    </IonCardContent>
142
-                </IonCard>
143
-
144
-                <IonCard>
145
-                    <IonCardHeader>
146
-                        <IonCardTitle>¿Para que equipo de la MLB jugó?</IonCardTitle>
147
-
148
-                    </IonCardHeader>
149
-                    <IonCardContent>
150
-                        <IonList>
151
-                            <IonItem>
152
-                                <IonCheckbox slot="start"></IonCheckbox>
153
-                                <IonLabel>New York Yankees</IonLabel>
154
-                            </IonItem>
155
-
156
-                            <IonItem>
157
-                                <IonCheckbox slot="start"></IonCheckbox>
158
-                                <IonLabel>Houston Astros</IonLabel>
159
-                            </IonItem>
160
-
161
-                            <IonItem>
162
-                                <IonCheckbox slot="start"></IonCheckbox>
163
-                                <IonLabel>Chicago Cubs</IonLabel>
164
-                            </IonItem>
165
-
166
-                            <IonItem>
167
-                                <IonCheckbox slot="start"></IonCheckbox>
168
-                                <IonLabel>Pittsburgh Pirates</IonLabel>
169
-                            </IonItem>
170
-                        </IonList>
171
-                    </IonCardContent>
172
-                </IonCard>
173
-
174
-                <IonButton>Verificar respuestas</IonButton>
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>
175 510
 
176 511
             </IonContent>
177 512