From 610b3910b0594273f09429d0c6fa9ff8e40b6023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Wed, 11 Sep 2024 22:40:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20#330=20=EC=A7=88=EB=AC=B8=20=EA=B0=9C?= =?UTF-8?q?=EC=88=98=20=EC=A0=9C=ED=95=9C=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customTemplate/AddQuestionsBottomSheet.tsx | 12 +++++++++++- .../customTemplate/EditQuestions.tsx | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/web/src/component/retrospectCreate/customTemplate/AddQuestionsBottomSheet.tsx b/apps/web/src/component/retrospectCreate/customTemplate/AddQuestionsBottomSheet.tsx index 183771e3..777322ca 100644 --- a/apps/web/src/component/retrospectCreate/customTemplate/AddQuestionsBottomSheet.tsx +++ b/apps/web/src/component/retrospectCreate/customTemplate/AddQuestionsBottomSheet.tsx @@ -101,7 +101,17 @@ export function AddQuestionsBottomSheet({ onClose, handleAddQuestions, maxCount overflow: auto; `} > - + { + if (!isChecked(value) && selectedValues.length >= maxCount) { + toast.error("추가 가능한 질문 개수를 초과했어요"); + return; + } + toggle(value); + }} + gap={4} + > {RECOMMENDED_QUESTIONS[curCategoryTab].map((question, index) => { return ( diff --git a/apps/web/src/component/retrospectCreate/customTemplate/EditQuestions.tsx b/apps/web/src/component/retrospectCreate/customTemplate/EditQuestions.tsx index 1e3043b8..14c5b5cb 100644 --- a/apps/web/src/component/retrospectCreate/customTemplate/EditQuestions.tsx +++ b/apps/web/src/component/retrospectCreate/customTemplate/EditQuestions.tsx @@ -78,6 +78,10 @@ export function EditQuestions({ goNext, goPrev }: EditQuestionsProps) { }; const onNext = () => { + if (newQuestions.length === 0) { + toast.error("최소 1개 이상의 질문으로 구성해주세요"); + return; + } saveData(); goNext(); };