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({
- {displaySellerBio} -
- {formatSellerRecentSalePrice(item.price)} -
-- {item.status ?? "정보없음"} -
-