-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor(toks-main): 카테고리 기능 리팩토링 및 Bug Fixed #402
Conversation
c152c4f
to
718dad3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #402 +/- ##
=====================================
Coverage ? 0.08%
=====================================
Files ? 176
Lines ? 6178
Branches ? 176
=====================================
Hits ? 5
Misses ? 6173
Partials ? 0 ☔ View full report in Codecov by Sentry. |
const Provider = ({ children }: StrictPropsWithChildren) => { | ||
return <RecoilRoot>{children}</RecoilRoot>; | ||
}; |
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.
넵 몰랐네요 ㄷㄷ templates 시급하게 때야할듯요
type CategoriesProps = { | ||
categories: Array<{ | ||
categoryName: string; | ||
isSelected: boolean; | ||
}>; | ||
onClick: VoidFunction; | ||
}; |
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.
요건 혹시 interface로 안하고 type으로 하신 이유가 있나요?
아무래도 상관 없긴 하지만 궁금해서 질문드립니다!
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.
type이 변수로도 선언되어서 범용성있고 interface에 비해 희미하지만 약간 성능이 더 좋다고 들었습니다 ㅎㅎ
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.
오호 처음알았어요
useLayoutEffect(() => { | ||
setSelectedTab(0); | ||
setSelectedLocalCategories([]); | ||
}, [isShow]); | ||
|
||
useEffect(() => { | ||
if (isLogin && isShow && selectedLoginCategory.length > 0) { | ||
setSelectedLocalCategories(selectedLoginCategory); | ||
} | ||
}, [isLogin, isShow, selectedLoginCategory]); | ||
|
||
useEffect(() => { | ||
if (selectedTemporaryCategory.length > 0 && isShow) { | ||
setSelectedLocalCategories(selectedTemporaryCategory); | ||
} | ||
}, [isShow, selectedTemporaryCategory]); |
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.
민석님 혹시 여기 각 useEffect가 어떤 목적으로 작성되었는지 간단한 주석 추가되면 어떨까요?
추후에 알아보기 쉽지 않을까해서 남겨봅니다
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.
18411a2 반영했습니다!
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.
여러가지 많이 고쳐주셨네요 고생 많으셨습니다!!
💡 왜 PR을 올렸나요?
카테고리 컴포넌트를 리팩토링합니다.
bug fix
💁 무엇이 어떻게 바뀌나요?
💬 리뷰어분들께