Skip to content

Conversation

Seono-Na
Copy link
Contributor

관련 이슈 번호

#21

핵심 변경 사항 및 이유

  • 오프셋 기반 게시글 조회 API 추가
    • 오프셋 기반 페이지네이션(getPostsByPage)을 사용할 수 있도록 기능 추가
    • 관련 타입(GetPostsOffset) 추가
    • 에러 핸들링을 위해 ERROR_MESSAGES.FETCH_FAILED 추가
  • 공통 페이지네이션 훅 (usePagination) 추가
    • 게시글 목록에서 재사용할 수 있는 페이지네이션 훅을 구현
    • 최대 5개 페이지 버튼을 보여주고, <, > 버튼을 통해 페이지 이동 가능
  • 페이지네이션 방식의 게시글 목록 (PostListPagination) 추가
    • usePagination 훅을 활용하여 페이지네이션을 적용한 게시글 목록 UI 구현
    • 기존 PostItem 컴포넌트를 활용하여 렌더링

이외 기타 변경 사항

  • app/page.tsx에서 추가
  • features/post/post-list/index.ts에 PostListPagination 추가

PR 시 참고 사항

  • 현재 feature/post-detail 브랜치에서도 작업 중이기 떄문에 feature-group/post에 머지하면 충돌을 해결해야 함
  • 기존 무한 스크롤 방식(PostInfiniteScroll)과 페이지네이션 방식(PostListPagination)이 함께 존재하므로, 이후 선택적으로 유지 여부를 결정해야 함

관련 스크린샷

image

@Seono-Na Seono-Na added type: feature 새로운 기능 & 기능적 개선 status: in-progress 현재 처리 중 labels Mar 30, 2025
@Seono-Na Seono-Na self-assigned this Mar 30, 2025
@rmkim7 rmkim7 merged commit c864fb8 into feature-group/post Apr 9, 2025
@github-actions github-actions bot added status: done 완료 and removed status: in-progress 현재 처리 중 labels Apr 9, 2025
@rmkim7 rmkim7 deleted the feature/post-list branch April 9, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: done 완료 type: feature 새로운 기능 & 기능적 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants