Skip to content

Commit 5d4ed3a

Browse files
committed
chore(apps/frontend-pwa): remove element title from asynchronous activity stacks
1 parent 0a8c545 commit 5d4ed3a

1 file changed

Lines changed: 23 additions & 16 deletions

File tree

apps/frontend-pwa/src/components/practiceQuiz/InstanceHeader.tsx

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)