refactor(notifications): gebruik question.options?.length als conditie

Gebruik de kortere optional chaining variant consistent, conform plan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scrum4Me Agent 2026-05-15 05:10:33 +02:00
parent df7d543d0c
commit a67ea73f2e

View file

@ -115,7 +115,7 @@ export function AnswerModal({ question, isDemo, onClose }: AnswerModalProps) {
{question.question}
</div>
{question.options && question.options.length > 0 && (
{question.options?.length ? (
<div className="space-y-2">
<p className="text-muted-foreground text-xs">Kies een van de opties:</p>
<div className="flex flex-col gap-2">
@ -134,12 +134,12 @@ export function AnswerModal({ question, isDemo, onClose }: AnswerModalProps) {
))}
</div>
</div>
)}
) : null}
<div className={question.options && question.options.length > 0 ? 'space-y-1 border-t pt-4' : 'space-y-1'}>
{question.options && question.options.length > 0 && (
<div className={question.options?.length ? 'space-y-1 border-t pt-4' : 'space-y-1'}>
{question.options?.length ? (
<p className="text-muted-foreground text-xs">Of typ een eigen antwoord</p>
)}
) : null}
<Textarea
value={answer}
onChange={(e) => setAnswer(e.target.value)}