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

[Feature] 검색페이지 api get #18

Merged
merged 2 commits into from
Dec 30, 2023
Merged

[Feature] 검색페이지 api get #18

merged 2 commits into from
Dec 30, 2023

Conversation

moondda
Copy link
Contributor

@moondda moondda commented Dec 29, 2023

close #17

Changes 📝

리액트쿼리로 데이터패칭해봤습니담

PR Points 🔍

next.config.js에서 계속 에러가 뜨는데 왜일까요??

Screenshot 2023-12-29 at 4 16 57 PM

Screenshot 📸

Screenshot 2023-12-29 at 4 19 42 PM

@moondda moondda changed the title Feat#17 [Feature] 검색페이지 api get Dec 29, 2023
@binllionaire
Copy link
Member

https://stackoverflow.com/questions/68163385/parsing-error-cannot-find-module-next-babel
요고 인거 같은데 제가 수정해볼게요!

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

Choose a reason for hiding this comment

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

이미지가 안 불러와져서 찾아봤는데 next/image 컴포넌트에서 지원되지 않는 호스트로부터 이미지를 가져오려고 시도하면 에러가 발생한다고 하더라고~! next.config.js 파일의 images 설정 내에 명시적으로 등록하면 해결되는거라서 등록한거에욤

Comment on lines 42 to 46
const handleBookSearchResult = () => {
setSearchQuery(searchQuery.trim());
if (searchQuery.trim()) {
refetch();
}
};
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

Choose a reason for hiding this comment

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

  • trim함수로 공백 제거
  • 검색어가 공백이 아니라면, refetch 함수를 호출 ( 데이터 업데이트)
    이런 의도를 담은 코든데, 검색어가 변경�될때마다 트리거되게 했어욤

@binllionaire binllionaire merged commit a3ecb6b into develop Dec 30, 2023
@moondda moondda self-assigned this Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 책 검색 api 연동
2 participants