diff --git a/src/app/products/[productId]/index.tsx b/src/app/products/[productId]/index.tsx index 12ab15c..fd6a644 100644 --- a/src/app/products/[productId]/index.tsx +++ b/src/app/products/[productId]/index.tsx @@ -244,25 +244,19 @@ export default function ProductDetailScreen({ showToastRef.current = showToast; }, [showToast]); - const displaySellerBio = productData?.seller?.bio ?? "정보없음"; + const sellerBio = auctionDetail?.seller?.bio ?? productData?.seller?.bio; + const displaySellerBio = + sellerBio == null || sellerBio.trim() === "" ? "정보없음" : sellerBio; + const sellerRating = + auctionDetail?.seller?.rating ?? productData?.seller?.rating; + const displaySellerRating = - productData?.seller?.rating == null - ? "정보없음" - : productData.seller.rating.toFixed(1); + sellerRating == null ? "정보없음" : sellerRating.toFixed(1); const displaySellerWarning = productData?.seller?.warningCount == null ? "정보없음" : `${productData.seller.warningCount}회`; const displaySellerAddress = displayLocation; - const sellerRecentSales = productData?.seller?.recentSales ?? []; - - function formatSellerRecentSalePrice(price?: number | null) { - if (price == null) { - return "정보없음"; - } - - return `${price.toLocaleString()}원`; - } useEffect(() => { if (regularPrice != null) { @@ -753,7 +747,7 @@ export default function ProductDetailScreen({ {displaySellerRating === "정보없음" ? "정보없음" - : `${displaySellerRating} (거래 ${sellerRecentSales.length}건)`} + : displaySellerRating} @@ -947,9 +941,6 @@ export default function ProductDetailScreen({

{displaySellerName}

-

- {displaySellerBio} -

@@ -978,34 +969,9 @@ export default function ProductDetailScreen({
-

상대 판매내역 (최근 3건)

-
- {sellerRecentSales.length === 0 ? ( -
- 정보없음 -
- ) : ( - sellerRecentSales.map((item, idx) => ( -
- - {item.title ?? "정보없음"} - -
-

- {formatSellerRecentSalePrice(item.price)} -

-

- {item.status ?? "정보없음"} -

-
-
- )) - )} +

소개글

+
+ {displaySellerBio}
diff --git a/src/services/auction/detail/types.ts b/src/services/auction/detail/types.ts index 1f7d7d3..7d1fbad 100644 --- a/src/services/auction/detail/types.ts +++ b/src/services/auction/detail/types.ts @@ -17,6 +17,8 @@ export interface AuctionDetailSeller { memberId: number; nickname: string; profileImageUrl: string | null; + rating?: number | null; + bio?: string | null; } export interface AuctionDetailResponse {