refactor: 다음 단계 핸들러 조건부 로직 단순화 #166
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 사항
스터디를 신청하는 과정중 다음 단계로 넘어가는 핸들러의 조건부 로직이 개선이 될 수 있을 것 같아 리팩터링을 진행했습니다.
currentStep === 2에서 2는 매직 넘버로 강의를 선택하는 단계의 변수를 할당하여 매직넘버를 제거해주었습니다.COURSE_STEP = 2if (currentStep >= TOTAL_STEPS) return;함수 가장 상단에 step을 확인하여 가독성을 높였습니다.
관련 이슈
close #163