diff --git a/components/features/my-page/recommend/RecommendedBookCard.tsx b/components/features/my-page/recommend/RecommendedBookCard.tsx
index db5ccd3..6eee385 100644
--- a/components/features/my-page/recommend/RecommendedBookCard.tsx
+++ b/components/features/my-page/recommend/RecommendedBookCard.tsx
@@ -3,17 +3,18 @@ import { BookOpen } from "lucide-react";
import type { MyPageRecommendBook } from "@/types/myPage";
export function RecommendedBookCard({ book }: { book: MyPageRecommendBook }) {
- const { title, authors, cover, url, publisher, publishedAt } = book;
- const year = publishedAt ? publishedAt.slice(0, 4) : "";
+ const { title, authors, thumbnail, url, publisher, price, salePrice } = book;
+ const hasDiscount = salePrice !== -1;
+ const hasThumbnail = thumbnail && thumbnail.trim() !== "";
return (
@@ -76,6 +55,16 @@ export function RecommendedBookList() { ); } + if (!booksData?.isPersonalized) { + return ( +
+ {booksData?.message ?? "아직 추천할 도서가 부족해요. 더 많은 글을 읽어보세요!"} +
+ ); + } + + const books = booksData.books; + if (books.length === 0) { return (@@ -85,18 +74,10 @@ export function RecommendedBookList() { } return ( - <> -
{title}
- - {description && ( -- {description} + {contents && ( +
+ {contents}
)}{authors.join(", ")}
- - {publisher} - · - {year} - - {price && ( - - {price.toLocaleString()}원 - - )} + {publisher} ++ {booksData?.message ?? "아직 추천할 도서가 부족해요. 더 많은 글을 읽어보세요!"} +
) : books.length === 0 ? (추천 서적이 없습니다. @@ -171,7 +177,7 @@ export function RecommendedSection() { ) : (