Skip to content

Conversation

@hanana1253
Copy link
Member

@hanana1253 hanana1253 commented Mar 30, 2022

PR Type

What kind of change does this PR introduce?

  • 버그를 수정했어요.
  • 새로운 기능을 추가했어요.
  • 코드 스타일 업데이트를 했어요(포맷팅, 지역변수)
  • 리팩토링을 했어요 (기능적인 변화 없이, api 변경 없이)
  • 환경설정을 변경했어요.
  • 문서 내용을 변경했어요.
  • 기타 사항을 설명해 주세요.

Related Issues

#62
#38

What does this PR do?

  • Search Page를 위한 RTK Query 빌더 작성 및 타입 정의
  • Search page 로직 작성
  • Pagination 삽입
  • CardList 만들면 조립해 넣어야 합니다.
  • currentPage가 바뀌는데도 RTK query에서 데이터를 fetch하지 않는 문제 해결
  • page에 대한 history 관리 추가해야 합니다.

Other information

참고: https://nextjs.org/docs/messages/next-image-unconfigured-host
unconfigured host로 된 static 서버에 image를 요청할 수 없는 문제 해결
- or로 해야할 것을 and로 해놨던 실수가 있었습니다.
- $hide 프롭을 isloading || hideHeader로 변경
- 1페이지는 SSR로, 2번부터는 CSR로 가져와 렌더링하는 로직 추가
- 첫 페이지에서 fetching 못하게 하려다보니 코드가 다소 난잡해져서 리팩토링 필요
- currentPage에서 바뀌어도 리스트가 렌더링되지 않는 기현상 발생

TODO:
- current page 바뀌면 리스트 업데이트
- CardList 컴포넌트 만들 필요
@hanana1253 hanana1253 added the 🧱 component 컴포넌트 단위 작업을 진행해요! label Mar 30, 2022
@hanana1253 hanana1253 self-assigned this Mar 30, 2022
@hanana1253 hanana1253 added this to the Sprint3 milestone Mar 30, 2022
@hanana1253
Copy link
Member Author

#53 이슈와도 연관이 있군요

return config;
},
images: {
domains: ['spoonacular.com'],
Copy link
Member Author

Choose a reason for hiding this comment

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

https://nextjs.org/docs/messages/next-image-unconfigured-host

unfigured host 문제로 config 파일 수정했어요

Copy link
Member Author

Choose a reason for hiding this comment

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

https://nextjs.org/docs/basic-features/image-optimization#remote-images

외부 서버 이미지 가져오는 경우에 대한 공식문서 자료도 읽어보면 도움이 되네요!

- RTK 쿼리로 isFetching 상태 시 로딩 컴포넌트 노출
- currentResults에 대해서 data가 바뀔 때 적용, 렌더링하도록 변경
- 타입정의만 하고 prop에 적용을 안해서 적어두었습니다.
- 이제 authStatus를 firebase로부터 가져와 추가합니다.
- withRouter를 통해 path가 '/'이고 링크를 통해 접근하는 경우 hasError 값을 false로 초기화
@hanana1253 hanana1253 merged commit 63f977a into TeamCooks:develop Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 component 컴포넌트 단위 작업을 진행해요!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant