-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: 상점 카테고리 아이디가 사라지는 에러 수정 #168
Conversation
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.
카테고리가 2개 이상일 경우는 생각안해도 괜찮을까요?
@hoooooony 2개 이상인 경우 고려해야 하네요 전체 카테고리를 가져오도록 수정했습니다. 4b555c6 |
if (shopInfo.shop_categories.length === 1) { | ||
setValue('category_ids', [shopInfo.shop_categories[0].id]); | ||
} else { | ||
setValue('category_ids', [1, categoryId]); | ||
const categoryIds = shopInfo.shop_categories.map((category) => category.id); | ||
setValue('category_ids', categoryIds); |
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.
앗 그렇네요... 전체보기 카테고리를 반드시 나눠야한다고 접근해서 그런 것 같네요
리펙토링할 때 참고하겠습니다!
[#169]request
Please check if the PR fulfills these requirements
develop
branch, not themain
branchdevelop
branch?Screenshot
가게 수정 시 카테고리 아이디가 지워지지 않도록 변경하였습니다.
2024-03-07.1.33.57.mov
Precautions (main files for this PR ...)
Close #169