Skip to content

신청 페이지 다음 단계 핸들러 조건부 중복 로직 단순화 #163

@ohinhyuk

Description

@ohinhyuk

요약

신청 페이지의 다음 단계 핸들러 내부의 조건부 로직이 이중으로 들어가서 복잡함.

const handleClickNextStep = () => {
      if (currentStep < TOTAL_STEPS) {
         if (currentStep === 2 && applicationData.courses.length === 0) {
            toast('최소 하나의 수업을 추가해주세요.');
            return;
         }
         setCurrentStep((prev) => prev + 1);
      }
   };

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions