Skip to content

[fix] 판매내역 & 상세 페이지 수정#122

Merged
Bigben2002 merged 2 commits into
devfrom
fix/#121
May 31, 2026
Merged

[fix] 판매내역 & 상세 페이지 수정#122
Bigben2002 merged 2 commits into
devfrom
fix/#121

Conversation

@Bigben2002

Copy link
Copy Markdown
Contributor

🚀 Summary

일반 상품 상세 페이지의 상품 정보 항목을 정리하고, 판매/구매내역 영수증에서 상대방 라벨이 올바르게 표시되도록 수정했습니다.


✨ Description

  • 일반 상품 상세 페이지의 상품 정보 섹션에서 상태 항목을 제거했습니다.
  • 일반 상품 상세 페이지의 상품 정보 섹션에서 배송비 항목을 제거했습니다.
  • 상태 항목 제거로 더 이상 사용하지 않는 displayStatus 변수를 정리했습니다.
  • 거래 영수증 화면에서 상대방 라벨을 mode 기준으로 분기하도록 수정했습니다.
    • 구매내역 영수증: 판매자
    • 판매내역 영수증: 구매자
  • 상대방 닉네임은 seller.nickname 또는 buyer.nickname을 우선 사용하고, 없을 경우 기존 counterpartNickname을 fallback으로 사용하도록 했습니다.

🎲 Issue Number

close #{Issue Number}

Copilot AI review requested due to automatic review settings May 31, 2026 07:32
@Bigben2002 Bigben2002 linked an issue May 31, 2026 that may be closed by this pull request
5 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 7:32am

@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

This pull request removes unused status and shipping fee fields from the product detail screen, cleans up code formatting, and dynamically displays the counterpart's label (seller or buyer) and nickname on the transaction receipt based on the transaction mode. The reviewer suggested refactoring the counterpart nickname assignment in TransactionReceipt.tsx to reduce duplication and improve readability.

Comment on lines +283 to +286
const counterpartNickname =
mode === "purchase"
? data.seller?.nickname ?? data.counterpartNickname ?? "-"
: data.buyer?.nickname ?? data.counterpartNickname ?? "-";

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

중복 코드를 줄이고 가독성을 높이기 위해 삼항 연산자를 간결하게 정리할 수 있습니다. data.counterpartNickname ?? "-" 부분이 양쪽 분기에 중복되어 있으므로, 대상 닉네임을 먼저 선택한 후 fallback 처리를 한 번에 적용하는 것이 더 깔끔합니다.

이 제안은 레포지토리 스타일 가이드의 가독성 원칙을 준수하는 데 도움이 됩니다.

Suggested change
const counterpartNickname =
mode === "purchase"
? data.seller?.nickname ?? data.counterpartNickname ?? "-"
: data.buyer?.nickname ?? data.counterpartNickname ?? "-";
const counterpartNickname =
(mode === "purchase" ? data.seller?.nickname : data.buyer?.nickname) ??
data.counterpartNickname ??
"-";
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

This PR updates product detail and transaction receipt display logic to remove unused/incorrect product info rows and show the correct counterpart label in purchase vs sales receipts.

Changes:

  • Removed the 상태 and 배송비 rows from the regular product detail 상품 정보 section.
  • Removed the now-unused displayStatus variable.
  • Updated transaction receipts to display 판매자 for purchase receipts and 구매자 for sales receipts, preferring seller.nickname / buyer.nickname with fallback.

Reviewed changes

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

File Description
src/components/transaction-receipt/TransactionReceipt.tsx Adds mode-based counterpart label and nickname selection for receipt headers.
src/app/products/[productId]/index.tsx Removes unused product info fields and includes formatting-only cleanup around existing auction logic.

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

@Bigben2002
Bigben2002 merged commit ab77cc1 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