From 996dc3b905b0cada94517cd35e1387fa3d12b032 Mon Sep 17 00:00:00 2001 From: timthedev07 Date: Wed, 10 Jan 2024 19:32:57 +0100 Subject: [PATCH] fix: use default value --- app/src/components/forms/QuestionForm.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/components/forms/QuestionForm.tsx b/app/src/components/forms/QuestionForm.tsx index 1f1ddeb..b2c3270 100644 --- a/app/src/components/forms/QuestionForm.tsx +++ b/app/src/components/forms/QuestionForm.tsx @@ -88,11 +88,17 @@ export const QuestionForm: FC = ({ const [formData, setFormData] = useState(() => { if (defaultValues && operationType === "update") { const { files: _, ...rest } = defaultValues; - return rest; + return { + ...rest, + content: rest.content.length + ? rest.content + : "Please see the attachments for the question that I have, thank you!", + }; } else { return { title: "", - content: "", + content: + "Please see the attachments for the question that I have, thank you!", categories: [], anonymous: false, };