Skip to content

[DP-418] 마이페이지 스크랩 목록 API 스펙 반영 (mock 구조 전환)#111

Merged
uiuuoq merged 1 commit intodevelopV2from
feature/DP-418-mypage-api-scrap
Apr 28, 2026
Merged

[DP-418] 마이페이지 스크랩 목록 API 스펙 반영 (mock 구조 전환)#111
uiuuoq merged 1 commit intodevelopV2from
feature/DP-418-mypage-api-scrap

Conversation

@uiuuoq
Copy link
Copy Markdown
Collaborator

@uiuuoq uiuuoq commented Apr 28, 2026

연결된 Jira 티켓

  • DP-418

작업 내용

  • MyPageScrap 타입을 백엔드 API 스펙에 맞게 수정 (id 제거, summary: string | null)
  • MyPageScrapResponse 응답 타입 추가
  • fetchMyScraps를 params 기반으로 변경하고 MyPageScrapResponse 반환하도록 수정
  • ScrappedPostsList에서 client-side 필터링/정렬/페이지네이션 제거 → mock params 전달 방식으로 전환
  • ScrappedPostsSection preview 반환 타입 대응 및 key={scrap.contentId} 교체

주요 변경점

  • types/myPage.ts: id 제거, summary: string | null, MyPageScrapResponse 추가
  • lib/mock/my-page-scraps.ts: fetchMyScraps(params?) → 검색/정렬/페이지네이션 mock 내부 처리
  • ScrappedPostsList.tsx: useReducer로 fetch 상태 관리, race condition 방지, 검색/정렬 변경 시 page 초기화
  • ScrappedPostsSection.tsx: res.content 추출, key contentId 교체

테스트 방법

  1. /my-page/scraps 진입 후 스크랩 목록 정상 렌더링 확인
  2. 검색어 입력 시 필터링 동작 및 page 0 초기화 확인
  3. 최신순/오래된순 정렬 전환 확인
  4. 페이지네이션 동작 확인 (10개 초과 시 표시)
  5. /my-page 메인에서 preview 카드 4개 정상 렌더링 확인

AI 사용 여부

  • Claude Code 사용

체크리스트

  • 빌드/테스트 확인
  • 리뷰어 지정
  • 라벨 지정

@uiuuoq uiuuoq added enhancement New feature or request automerge Enables auto-merge for this PR after successful CI/CD checks labels Apr 28, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
traceapp Ready Ready Preview, Comment Apr 28, 2026 5:07am

@uiuuoq uiuuoq merged commit d3e1494 into developV2 Apr 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Enables auto-merge for this PR after successful CI/CD checks enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant