-
Notifications
You must be signed in to change notification settings - Fork 4
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
[feat/CK-212] 로드맵 생성페이지 오류를 해결한다. #171
Conversation
VERY_EASY: '매우쉬움', | ||
EASY: '쉬움', | ||
NORMAL: '보통', | ||
DIFFICULT: '어려움', | ||
VERY_DIFFICULT: '매우어려움', |
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.
오옥 ㅋㅋㅋ
이걸 고쳤네
대박 고생하셨어요🤩
|
||
export type DifficultyValueType = '매우쉬움' | '쉬움' | '보통' | '어려움' | '매우어려움'; | ||
|
||
export type DifficultiesType = { [key in DifficultyKeyType]: DifficultyValueType }; |
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.
잊혀지지 않는 타입스크립트 문법 ㅋㅋ 👍
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.
킄킄 이걸 알아먹다니
if (ref.current === null) return; | ||
if (ref.current.value === '') return; |
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.
사소하지만 아래와 같이 단순화할 수 있을 것 같습니다!
if (!ref.current?.value) return;
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.
너무 똑똑해서 화가 다 나네요..
@@ -27,7 +30,7 @@ export const useCollectRoadmapData = () => { | |||
})); |
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.
DummyCategoryType
가 아직 사용되고 있네요
이제 타입을 수정해줘도 괜찮을 것 같아요!
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.
디버깅이 쉽지 않았을텐대 정말 고생하셨어요!
👍👍👍👍👍👍👍👍👍
코맨트 확인 부탁드려요🤩
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.
넘 고생하셨어요!!!
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.
크으으... 진짜 싹다 고치셨군요 👍 너무 고생하셨어요 ㅎㅎ 코멘트 몇개만 확인 부탁드려요!
{getInvariantObjectKeys(invariantOf(Difficulties)).map((difficulty, idx) => { | ||
return ( |
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.
getInvariantObjectKeys(invariantOf(Difficulties))[selectedOption]
와 같은 코드가 여러 번 나타나고 있는 것 같아요!.로직을 추가로 별도의 유틸리티 함수로 분리하는 것은 불가능할까요? 😀
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.
험.... 이미 유틸로 빼져있는 함수라서 이부분은 더 고민해볼께요!!
@@ -27,7 +30,7 @@ export const useCollectRoadmapData = () => { | |||
})); | |||
}; | |||
|
|||
const getSelectedDifficulty = (difficulty: keyof DummyDifficultyType | null) => { | |||
const getSelectedDifficulty = (difficulty: DifficultyKeyType | null) => { |
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.
getSelectedDifficulty라는 메서드 이름은 "get"이라는 동사를 사용하고 있지만, 실제로는 값을 설정(set)하는 역할을 하는 것처럼 보이는데 네이밍을 바꾸면 어떨까요?? 😀
📌 작업 이슈 번호
CK-212
✨ 작업 내용
로드맵 생성페이지 오류 해결했습니다.
💬 리뷰어에게 남길 멘트
잘부탁드림당~
🚀 요구사항 분석