@@ -35,22 +35,23 @@ function renderQuestions(questions: Array<QuestionFieldsFragment>) {
35
35
// #render multiple choice question
36
36
switch ( question . __typename ) {
37
37
case 'FrQuestion' : {
38
+ const answer = question . answer ? question . answer : 'Not answered.' ;
38
39
return (
39
- < div className = "col-12" key = { question . id } >
40
+ < div className = "col-12 my-3 " key = { question . id } >
40
41
< p className = "question-desc" >
41
42
< span className = "question-index" > { index + 1 } </ span >
42
43
{ question . description }
43
44
</ p >
44
45
< InputGroup className = "mb-3" >
45
- < FormControl aria-label = "Type your answer here." />
46
+ < FormControl value = { answer } disabled />
46
47
</ InputGroup >
47
48
</ div >
48
49
) ;
49
50
}
50
51
case 'McQuestion' : {
51
52
const mcQ = question ;
52
53
return (
53
- < div className = "col-12" key = { mcQ . id } >
54
+ < div className = "col-12 my-3 " key = { mcQ . id } >
54
55
< p className = "question-desc" >
55
56
< span className = "question-index" > { index + 1 } </ span >
56
57
{ mcQ . description }
@@ -69,17 +70,17 @@ function QuizBlock({
69
70
title,
70
71
questions,
71
72
reqScore,
73
+ cssKey,
72
74
} : {
73
75
title : string ;
74
76
questions : QuestionFieldsFragment [ ] ;
75
77
reqScore : number ;
78
+ cssKey : number ;
76
79
} ) {
77
80
return (
78
- < div className = "row" >
79
- < div className = "col-md-12 py-3 my-2" >
80
- < h2 className = "text-left" >
81
- < b > { title } </ b >
82
- </ h2 >
81
+ < div className = { `${ cssKey % 2 === 1 ? 'white ' : 'gray ' } row` } >
82
+ < div className = "col-md-6 text-center py-5 mx-auto" >
83
+ < h3 className = "text-left mb-3" > { title } </ h3 >
83
84
< p className = "text-left" > Required Score: { reqScore } </ p >
84
85
< div className = "row" > { renderQuestions ( questions ) } </ div >
85
86
</ div >
0 commit comments