Skip to content

[fix] 상품 상세 판매자 프로필 정보 표시 수정#124

Merged
Bigben2002 merged 3 commits into
devfrom
fix/#123
May 31, 2026
Merged

[fix] 상품 상세 판매자 프로필 정보 표시 수정#124
Bigben2002 merged 3 commits into
devfrom
fix/#123

Conversation

@Bigben2002

Copy link
Copy Markdown
Contributor

📌 Summary

상품 상세 화면의 판매자 프로필 정보 표시를 수정했습니다.


📝Description

  • 경매 상세 응답의 판매자 타입에 rating, bio 필드를 추가했습니다.
  • 일반 상품/경매 상품 상세 화면에서 판매자 평점을 공통으로 표시하도록 수정했습니다.
    • 경매 상세에서는 auctionDetail.seller.rating을 우선 사용합니다.
    • 일반 상품 상세에서는 기존처럼 productData.seller.rating을 사용합니다.
  • 평점 옆에 표시되던 (거래 N건) 문구를 제거했습니다.
  • 판매자 프로필 모달에서 상대 판매내역 (최근 3건) 섹션을 제거했습니다.
  • 제거된 판매내역 영역에 소개글 섹션을 추가했습니다.
  • 소개글은 auctionDetail.seller.bio ?? productData.seller.bio 기준으로 표시하며, 값이 없거나 공백이면 정보없음을 표시합니다.

검증:

  • npx tsc --noEmit 통과

🔗 Issue Number

close #123

Copilot AI review requested due to automatic review settings May 31, 2026 10:08
@Bigben2002 Bigben2002 linked an issue May 31, 2026 that may be closed by this pull request
3 tasks
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dealit Ready Ready Preview, Comment May 31, 2026 10:08am

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 풀 리퀘스트는 경매 상세 정보(auctionDetail)에서 판매자의 소개글(bio)과 평점(rating)을 가져와 표시하도록 수정하고, 기존의 최근 판매 내역 대신 판매자 소개글을 화면에 렌더링하도록 변경합니다. 또한 관련 타입 정의를 업데이트했습니다. 리뷰에서는 displaySellerBio를 결정하는 로직을 sellerBio?.trim() || "정보없음"과 같이 간결하게 개선할 것과, displaySellerRating 렌더링 시 불필요한 중복 삼항 연산자를 제거하여 가독성을 높일 것을 제안하고 있습니다.

Comment on lines +248 to +249
const displaySellerBio =
sellerBio == null || sellerBio.trim() === "" ? "정보없음" : sellerBio;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

삼항 연산자와 trim()을 사용한 빈 문자열 검사 로직은 ?. 연산자와 || 연산자를 활용하여 훨씬 간결하고 가독성 좋게 작성할 수 있습니다. sellerBio?.trim() || "정보없음"과 같이 작성하면 동일한 동작을 하면서도 코드가 명확해집니다.

Suggested change
const displaySellerBio =
sellerBio == null || sellerBio.trim() === "" ? "정보없음" : sellerBio;
const displaySellerBio = sellerBio?.trim() || "정보없음";
References
  1. 가독성을 고려하여 코드를 작성해야 합니다. (link)

{displaySellerRating === "정보없음"
? "정보없음"
: `${displaySellerRating} (거래 ${sellerRecentSales.length}건)`}
: displaySellerRating}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

displaySellerRating 변수는 이미 위에서 sellerRating == null ? "정보없음" : sellerRating.toFixed(1)로 정의되어 항상 문자열 값을 가집니다. 따라서 여기서 다시 한번 "정보없음" 여부를 체크하는 삼항 연산자(748~750라인)는 불필요하며, 단순히 {displaySellerRating}만 렌더링하도록 단순화하여 가독성을 높일 수 있습니다.

References
  1. 가독성을 고려하여 중복되거나 불필요한 로직을 단순화해야 합니다. (link)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

상품 상세/경매 상세 공유 화면에서 판매자 프로필 정보 표시를 정리하는 PR입니다. 경매 응답 타입에 rating/bio를 추가하고, 평점·소개글 표시 로직을 경매·일반 양쪽에서 공통 사용하도록 수정했습니다.

Changes:

  • AuctionDetailSeller에 optional rating, bio 필드 추가
  • 평점/소개글 표시 시 auctionDetail 우선, 없으면 productData fallback. 빈 문자열은 정보없음
  • 모달의 "상대 판매내역" 섹션 및 평점 옆 거래 건수((거래 N건)) 제거, "소개글" 섹션 신규 추가

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/services/auction/detail/types.ts AuctionDetailSellerrating, bio 옵셔널 필드 추가
src/app/products/[productId]/index.tsx 평점/소개글 통합 로직, 거래 건수·최근 판매내역 UI 제거, 소개글 섹션 추가

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bigben2002
Bigben2002 merged commit 4acab1a into dev May 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 프론트 경매쪽 수정

2 participants