-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate redux reducer about planner #63
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## migration #63 +/- ##
============================================
+ Coverage 4.12% 4.51% +0.38%
============================================
Files 211 210 -1
Lines 6547 6495 -52
Branches 1686 1747 +61
============================================
+ Hits 270 293 +23
+ Misses 6134 6026 -108
- Partials 143 176 +33 ☔ View full report in Codecov by Sentry. |
더이상 리뷰 없어 주석 지우고 PR 올리겠습니다 |
src/components/sections/planner/plannerandinfos/PlannerTabs.jsx
Outdated
Show resolved
Hide resolved
change snake case to camel case remove new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
planner.ts 코드 원복합시다 @yumincho
src/components/sections/planner/plannerandinfos/PlannerTabs.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변경사항
list.ts
이에 따라 enum 타입에 전공과목들을 추가하고 이를 key 로 사용함.
전공과목 탭을 클릭할 경우 state 의 list의 키로 해당 전공과목이 추가되며, 불러온 리스트들이 value 로 닮김.
planner.ts
[] 로 초기화 시켜주는 것을 지우고 initial state 를 null 에서 Planner[] 로 변경,
Planners 가 null 일 필요가 없는 것으로 확인하여 type 추론에 유리하도록 변경하였음.
search.ts
itemFocus.ts
type ItemFocus = NoneItem | ListItem | AddingItem | TableItem | CategoryItem;
새로운 state를 만들 때 이전의 state 를 복제하는 부분을 지우는 것이 의미적으로 맞는 것 같은데, 상태를 변경하기 전에 clear 를 통해 초기화해주므로 문제는 없는 것 같아 그대로 두었음. (ex. category Item을 set 할 때, 이전의 ListItem 의 속성을 가지면 안되므로...)
기타