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

[#338] Refactor: main page 탠스택 쿼리 적용 #339

Merged
merged 14 commits into from
Jun 1, 2024

Conversation

ienrum
Copy link
Collaborator

@ienrum ienrum commented Apr 10, 2024

💬 Issue Number

🤷‍♂️ Description

작업 내용에 대한 설명

메인페이지서 get 요청되는 것을 tanstack query 로 수정합니다.
search posts api 는 모든 posts 를 불러올수밖에 없어 useQuery 로 작성합니다.

메인 페이지의 PostList 컴포넌트의 책임이 너무 큰것같아, 분리 합니다.

@rollup/rollup-win32-x64-msvc missing 버그로 인해 해당 의존성 추가합니다.

✅Todo

  • fetch all posts (useInfiniteQuery)
  • fetch channel posts (useInfiniteQuery)
  • fetch search posts (useQuery)
  • 라우터로 PostList 컴포넌트 분리
    • home/all
    • home/channel/:channelId
    • home/search/:search
  • status slice 삭제

📷 Screenshots

작업 결과물

이렇게 분리했습니다
image

👻 Good Function

팀원에게 공유하고 싶은 함수나 코드 일부

📋 Check List

PR 전 체크해주세요.

  • Merge 하는 브랜치가 올바른가?
  • 코딩컨벤션을 준수하는가?
  • PR과 관련없는 변경사항이 없는가?

📒 Remarks

팀원이 코드리뷰 시 주의할 점 또는 말하고 싶은 점 특이사항

notion 에 useInfiniteQuery 관련글 작성하여 공유하겠습니다,

Copy link
Collaborator

@YunSukHyun YunSukHyun left a comment

Choose a reason for hiding this comment

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

엄청난 작업령이군요 수고하셨습니다.

package.json Show resolved Hide resolved
src/slices/postList/index.ts Show resolved Hide resolved
Copy link
Collaborator

@HoberMin HoberMin left a comment

Choose a reason for hiding this comment

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

수학님 고생하셨습니다 리뷰 확인하시고 태그해서 한번 불러주세요 !!

리뷰폭탄이긴한데 재대로 된 리뷰가 포함되어있는지 잘 모르겠네요 👍

src/apis/getChannel.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
src/apis/getChannels.ts Outdated Show resolved Hide resolved
src/apis/getPosts.ts Outdated Show resolved Hide resolved
src/apis/getPosts.ts Outdated Show resolved Hide resolved
src/pages/Main/components/hooks/useFetchSearchPosts.ts Outdated Show resolved Hide resolved
@HoberMin HoberMin merged commit 8c24481 into dev Jun 1, 2024
@HoberMin HoberMin deleted the refactor/#338-main-page/chae branch June 1, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants