File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,34 @@ function App() {
15
15
return < Loading > </ Loading > ;
16
16
}
17
17
18
- return < main > quiz</ main > ;
18
+ const { correct_answer, incorrect_answers, question } = questions [ index ] ;
19
+ const answers = [ ...incorrect_answers , correct_answer ] ;
20
+
21
+ return (
22
+ < main >
23
+ { /* <Modal></Modal> */ }
24
+ < section className = "quiz" >
25
+ < p className = "correct-answers" >
26
+ correct answers : { correct } /{ index }
27
+ </ p >
28
+ < article className = "container" >
29
+ < h2 dangerouslySetInnerHTML = { { __html : question } } > </ h2 >
30
+ < div className = "btn-container" >
31
+ { answers . map ( ( answer , index ) => {
32
+ return (
33
+ < button
34
+ key = { index }
35
+ className = "answer-btn"
36
+ dangerouslySetInnerHTML = { { __html : answer } }
37
+ > </ button >
38
+ ) ;
39
+ } ) }
40
+ </ div >
41
+ </ article >
42
+ < button className = "next-question" > next question</ button >
43
+ </ section >
44
+ </ main >
45
+ ) ;
19
46
}
20
47
21
48
export default App ;
You can’t perform that action at this time.
0 commit comments