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:
parent
df7d543d0c
commit
a67ea73f2e
1 changed files with 5 additions and 5 deletions
|
|
@ -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)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue