[DP-443] 마이페이지 추천 도서 mock → 신규 API 스펙 구조로 변경#120
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
연결된 Jira 티켓
작업 내용
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:contentsnull 처리, 동일 가격 표시 로직,hasThumbnail방어 처리RecommendedBookList.tsx: 페이지네이션 제거,isPersonalized안내 문구 처리 (message ?? 기본값),key={book.url}RecommendedSection.tsx: books state 타입 교체,isPersonalized처리,key={book.url}테스트 방법
/my-page접속 → 추천 서적 카드 4개 정상 렌더링 확인salePrice: -1) — 정가만 표시 확인thumbnail: null도서 — fallback 아이콘 렌더링 확인/my-page/recommend/book) 접속 → 10개 목록, 페이지네이션 없음 확인isPersonalized: false로 변경 후 안내 문구 표시 확인AI 사용 여부
체크리스트