Skip to content
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

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

dooohun
Copy link
Contributor

@dooohun dooohun commented Mar 7, 2024

[#169]request

  • 상점 카테고리 아이디가 사라지는 에러 수정했습니다.

Please check if the PR fulfills these requirements

  • It's submitted to develop branch, not the main branch
  • The commit message follows our guidelines
  • Did you merge recent develop branch?

Screenshot

가게 수정 시 카테고리 아이디가 지워지지 않도록 변경하였습니다.

2024-03-07.1.33.57.mov

Precautions (main files for this PR ...)

Close #169

@dooohun dooohun added the 🐞 BugFix 버그 해결 label Mar 7, 2024
@dooohun dooohun self-assigned this Mar 7, 2024
@dooohun dooohun requested a review from hoooooony March 7, 2024 04:40
Copy link
Contributor

@hoooooony hoooooony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

카테고리가 2개 이상일 경우는 생각안해도 괜찮을까요?

@dooohun
Copy link
Contributor Author

dooohun commented Mar 7, 2024

@hoooooony 2개 이상인 경우 고려해야 하네요 전체 카테고리를 가져오도록 수정했습니다. 4b555c6

@hoooooony hoooooony merged commit 77f3b1b into develop Mar 7, 2024
1 check passed
@hoooooony hoooooony deleted the fix/edit-modal-category branch March 7, 2024 05:18
Comment on lines +136 to +140
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

두 의미가 같은것같은데 조건문의 의미가 있나요?

Copy link
Contributor Author

@dooohun dooohun Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 그렇네요... 전체보기 카테고리를 반드시 나눠야한다고 접근해서 그런 것 같네요
리펙토링할 때 참고하겠습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 BugFix 버그 해결
Projects
None yet
Development

Successfully merging this pull request may close these issues.

가게 수정 시 카테고리가 사라지는 에러
3 participants