File tree Expand file tree Collapse file tree
apps/frontend-pwa/src/components/practiceQuiz Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,23 +136,30 @@ function InstanceHeader({
136136 return (
137137 < div className = { className } >
138138 < div className = "flex flex-row justify-between" >
139- < div className = "flex flex-row items-center gap-2" >
140- { correctness === ResponseCorrectnessType . Correct && (
141- < FontAwesomeIcon icon = { faCheckDouble } className = "text-green-700" />
142- ) }
143- { correctness === ResponseCorrectnessType . Partial && (
144- < FontAwesomeIcon icon = { faCheck } className = "text-yellow-600" />
145- ) }
146- { correctness === ResponseCorrectnessType . Incorrect && (
147- < FontAwesomeIcon icon = { faXmark } className = "text-red-600" />
148- ) }
149- < div
150- className = "text-lg font-bold"
151- data-cy = { `element-instance-header-${ name } ` }
152- >
153- { name }
139+ { typeof correctness !== 'undefined' ? (
140+ < div className = "flex flex-row items-center gap-2" >
141+ { correctness === ResponseCorrectnessType . Correct && (
142+ < FontAwesomeIcon
143+ icon = { faCheckDouble }
144+ className = "text-green-700"
145+ />
146+ ) }
147+ { correctness === ResponseCorrectnessType . Partial && (
148+ < FontAwesomeIcon icon = { faCheck } className = "text-yellow-600" />
149+ ) }
150+ { correctness === ResponseCorrectnessType . Incorrect && (
151+ < FontAwesomeIcon icon = { faXmark } className = "text-red-600" />
152+ ) }
153+ < div
154+ className = "text-lg font-bold"
155+ data-cy = { `element-instance-header-${ name } ` }
156+ >
157+ { name }
158+ </ div >
154159 </ div >
155- </ div >
160+ ) : (
161+ < div />
162+ ) }
156163 { withParticipant && (
157164 < div className = "flex flex-row items-center gap-1" >
158165 < Button
You can’t perform that action at this time.
0 commit comments