Skip to content

Commit

Permalink
Merge pull request #371 from depromeet/fix/330/qa
Browse files Browse the repository at this point in the history
  • Loading branch information
leeminhee119 authored Sep 11, 2024
2 parents c0f5ae3 + 610b391 commit a47d0cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,17 @@ export function AddQuestionsBottomSheet({ onClose, handleAddQuestions, maxCount
overflow: auto;
`}
>
<CheckBoxGroup isChecked={isChecked} onChange={toggle} gap={4}>
<CheckBoxGroup
isChecked={isChecked}
onChange={(value) => {
if (!isChecked(value) && selectedValues.length >= maxCount) {
toast.error("추가 가능한 질문 개수를 초과했어요");
return;
}
toggle(value);
}}
gap={4}
>
{RECOMMENDED_QUESTIONS[curCategoryTab].map((question, index) => {
return (
<QuestionItemCheckbox value={question} key={index}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export function EditQuestions({ goNext, goPrev }: EditQuestionsProps) {
};

const onNext = () => {
if (newQuestions.length === 0) {
toast.error("최소 1개 이상의 질문으로 구성해주세요");
return;
}
saveData();
goNext();
};
Expand Down

0 comments on commit a47d0cd

Please sign in to comment.