Skip to content

[DP-443] 마이페이지 추천 도서 mock → 신규 API 스펙 구조로 변경#120

Merged
uiuuoq merged 1 commit into
developV2from
feature/DP-443-mypage-api-recommendation-book
Apr 30, 2026
Merged

[DP-443] 마이페이지 추천 도서 mock → 신규 API 스펙 구조로 변경#120
uiuuoq merged 1 commit into
developV2from
feature/DP-443-mypage-api-recommendation-book

Conversation

@uiuuoq
Copy link
Copy Markdown
Collaborator

@uiuuoq uiuuoq commented Apr 30, 2026

연결된 Jira 티켓

  • DP-443

작업 내용

  • 마이페이지 추천 도서 섹션을 신규 API 스펙(GET /recommend/books)에 맞게 변경 (mock 유지)

주요 변경점

  • types/myPage.ts: MyPageRecommendBook 필드 교체 (bookId·description·cover·publishedAt 제거, thumbnail·contents·salePrice 추가), MyPageRecommendBooksResponse 타입 추가
  • lib/mock/my-page-recommend-book.ts: 10개 고정, { books, isPersonalized, message } 구조 반환, salePrice 할인/미할인(-1) 혼합
  • RecommendedBookCard.tsx: hasThumbnail 빈 문자열 방어 처리, 가격 표시 (salePrice !== -1이면 정가 취소선 + 할인가 강조)
  • RecommendedBookListItem.tsx: contents null 처리, 동일 가격 표시 로직, hasThumbnail 방어 처리
  • RecommendedBookList.tsx: 페이지네이션 제거, isPersonalized 안내 문구 처리 (message ?? 기본값), key={book.url}
  • RecommendedSection.tsx: books state 타입 교체, isPersonalized 처리, key={book.url}

테스트 방법

  1. /my-page 접속 → 추천 서적 카드 4개 정상 렌더링 확인
  2. 할인가 있는 도서 — 정가 취소선 + 할인가 표시 확인
  3. 할인가 없는 도서(salePrice: -1) — 정가만 표시 확인
  4. thumbnail: null 도서 — fallback 아이콘 렌더링 확인
  5. 전체 보기(/my-page/recommend/book) 접속 → 10개 목록, 페이지네이션 없음 확인
  6. mock에서 isPersonalized: false로 변경 후 안내 문구 표시 확인

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 30, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

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

Project Deployment Actions Updated (UTC)
traceapp Ready Ready Preview, Comment Apr 30, 2026 0:54am

@uiuuoq uiuuoq merged commit 64d1758 into developV2 Apr 30, 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