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

[Search] 카테고리 선택 버튼 구현 #269

Merged
merged 4 commits into from
Feb 27, 2024
Merged

Conversation

junghaesung79
Copy link
Contributor

[#248] request

  • 카테고리 버튼을 만들었습니다.
  • 기본 값은 음식점입니다.

shops를 가져오는 api에 category를 추가했습니다.
하지만 개발 환경에서 불러오는 정보가 정해져 있어서 테스트할 방법을 모르겠습니다...

Please check if the PR fulfills these requirements

  • It's submitted to develop branch, not the main branch
  • The commit message follows our guidelines
  • There are no warning message when you run yarn lint
  • Docs updated for breaking changes

Screenshot

image
image

Precautions (main files for this PR ...)

isCafe: boolean;
}

export default function CategorySelect({ className, isCafe, onClick }: Props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

통상적으로 두개의 상태로 관리되는 ui 는 토글이라는 말을 더 많이 쓰는것같아요

Suggested change
export default function CategorySelect({ className, isCafe, onClick }: Props) {
export default function CategoryToggle({ className, isCafe, onClick }: Props) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

저도 이름을 정하는 데 고민이 많이 되더라구요. 원래 CategoryToggleButton이나 CategoryToggle로 정하고 만들고 있는데 읽고 생각할 때 어감이 좀 이상했어요. 그리고 on/off의 상태가 아니기 때문에 toggle이 무조건 맞다는 생각이 안 들더라구요. 이건 다른 분들한테도 물어보고 싶어요.

Copy link
Contributor

Choose a reason for hiding this comment

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

토글은 a <=> !a 의 느낌이 강한데
카페와 음식점이라는 서로 다른 값을 선택하는 느낌이라 select도 좋은 것 같아요

Comment on lines -26 to +27
const { location, keyword } = params;
const url = `/shops?keyword=${keyword}`;
const { keyword, category, location } = params;
const url = `/shops?keyword=${keyword}?category=${category}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@hanagertrudeKim hanagertrudeKim left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~ 막바지에 변경사항 적용하시느라 고생이 많네요 😅
코멘트 확인해주시고 바로 머지해도 될 것 같아요!

@junghaesung79 junghaesung79 changed the title Feature/#274 [Search] 카테고리 버튼 Feb 27, 2024
@junghaesung79 junghaesung79 changed the title [Search] 카테고리 버튼 [Search] 카테고리 선택 버튼 구현 Feb 27, 2024
@junghaesung79 junghaesung79 merged commit 9a1e6ad into develop Feb 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants