-
Notifications
You must be signed in to change notification settings - Fork 3
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: zustand로 isSideBarOpen 상태 관리 / desktop 사이즈 일때 narrow 사이즈 고려 #71
Conversation
올바른 PR 형식올바른 PR 형식입니다. |
@@ -8,14 +8,11 @@ interface StackProps { | |||
} | |||
|
|||
export default function Stack({ stack }: StackProps) { | |||
const icon = stack ? STACK_ICONS[stack] : undefined; | |||
//임시 | |||
const icon = stack && STACK_ICONS[stack] ? STACK_ICONS[stack] : ICONS.questionMark; |
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.
stack && STACK_ICONS[stack]
의 && STACK_ICONS[stack]
은 /src/constants/stackIcons.ts 파일이 완성되면 제거해도 되는 조건 입니다.
return isSidebarOpenNarrow; | ||
}; | ||
|
||
export default useResponsiveSidebar; |
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.
hook 감사합니다! 따봉
📌요구사항
📌작업 진행 상황 (에러, 막혔던 부분, 그외 궁금한것 등등)
useResponsiveSidebar
hook은isSidebarOpenNarrow
변수를 반환함const isSidebarOpenNarrow = isSideBarOpen && screenWidth < 1410;
이므로 사이드바가 열렸고, 스크린 width가 1410px 이하일 경우 true를 반환함📌스크린샷 / 테스트결과 (선택)
home_sidebar_.mp4
Scrap_onClick.mp4
📌이슈 번호