Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat/#564 poi 적용 #566
feat/#564 poi 적용 #566
Changes from all commits
936777c
631860c
facd655
cdae8c5
0b4d176
c829eb6
35234b0
00f4fe5
b799c5c
5914ca7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
public의 index.html 에 있는 키는 못 숨기겠죠?? ㅋㅋㅋㅋ 어차피 도메인 검사를 한다고는 들었는데
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.
콘솔 의도하신 부분인가요??
poi 검색 결과가 없으면 에러를 던지는데 showToast 하는게 좋을까요? 아니면 에러를 던지지 않고 suggestions에 UI 적으로 '검색 결과가 없습니다.' 라고 하는게 나을까요?
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.
아하 setSuggestions로 suggestions를 '검색결과가 없습니다'라고 하면 좋을 것 같네요
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.
아하 에러를 반환하는 경우가 두 가지가 있네요.
첫 번째로 위 두 상황은 모두 검색어에 대한 검색 결과가 없을 때 발생한다는 공통점이 있습니다. 그래서 catch 문에 말씀하신 대로
setSuggestions(['검색결과가 없습니다']);
와 같은 구문이 필요해보입니다. 👍두 번째로 검색어를 빈문자열로 보내면 network 에러가 발생하고 이는 결과적으로 불필요한 행동이므로 아래 처럼 e.target.value가 빈 값이면 api 요청 자체를 하지 않는 로직을 추가해보면 어떨가 싶습니다. (간단하게 짰습니다.)
이렇게 하면 network 에러 발생 안 하고 불필요한 api 호출도 하지 않네여~