From f22db5d68aeefedf9cdadecbd80cc27905da1469 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Mon, 5 Aug 2024 17:04:13 +0200 Subject: [PATCH] fix: Update CustomQuestionCard to handle options as objects --- .../components/fieldsSelectors/CustomQuestionCard.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/preselectionForms/components/fieldsSelectors/CustomQuestionCard.tsx b/src/pages/preselectionForms/components/fieldsSelectors/CustomQuestionCard.tsx index c2e55291..71bf6b4d 100644 --- a/src/pages/preselectionForms/components/fieldsSelectors/CustomQuestionCard.tsx +++ b/src/pages/preselectionForms/components/fieldsSelectors/CustomQuestionCard.tsx @@ -15,7 +15,9 @@ export const CustomQuestionCard: React.FC<{ question: "", shortTitle: "", name: `Custom ${getCustomQuestionTypeLabel(selected)}`, - ...(selected !== "text" ? { options: ["", ""] } : undefined), + ...(selected !== "text" + ? { options: [{ value: "" }, { value: "" }] } + : undefined), }); };