Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ArtBuyerAuction = () => {
// status 값을 한글로 변환하는 함수
const getStatusText = (status: string) => {
const statusMap: Record<string, string> = {
BID: '응찰중',
BID: '경매완료',
PARTICIPATE: '입찰중',
};
return statusMap[status] || status; // 기본적으로 원래 상태값 유지
Expand Down Expand Up @@ -55,7 +55,7 @@ export const ArtBuyerAuction = () => {
<TableCell>{`₩${auction.bid_price.toLocaleString()}`}</TableCell>
<TableCell>{getStatusText(auction.status)}</TableCell>
<TableCell>
{auction.status === '입찰중' && (
{auction.status === 'PARTICIPATE' && (
<AuctionButton
onClick={() => handleBtnClick(auction.auction_id)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ export const Payment = () => {
</TableCell>
<TableCell>{getPaymentStatus(payment.payment_status)}</TableCell>
<TableCell>
{payment.payment_status === '결제 대기중' && (
<PaymentButton
onClick={() => handleBtnClick(payment.auction_id)}
>
{payment.payment_status === 'PENDING' && (
<PaymentButton onClick={() => handleBtnClick(payment.id)}>
결제하기
</PaymentButton>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/artBuyerPage/components/menuMyPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const MenuMyPage = ({ setSelectedMenu }: MenuMyPageProps) => {
</ProfileContainer>
<MyPageContainer>
<Payment />
<MyCollection />
<ArtBuyerAuction />
<MyCollection />
</MyPageContainer>
</MyPageWrapper>
);
Expand Down
8 changes: 8 additions & 0 deletions src/pages/artBuyerPage/components/purchasedWorks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ import {
import { Artwork } from '@/components/common/ArtWork';

import { useGetBuyerMypage } from '../../hooks/useGetBuyerMypage';
import { useNavigate } from 'react-router-dom';

const PurchasedWorks = () => {
const navigate = useNavigate();
// 작품 클릭 시 작품 상세 페이지로 이동
const handleArtworkClick = (artworkId: number) => {
navigate(`/artwork/${artworkId}`);
};

const { userMypageData } = useGetBuyerMypage();

const artworks = userMypageData.myCollection.artworks;
Expand All @@ -30,6 +37,7 @@ const PurchasedWorks = () => {
artworkWidth={artwork.width}
artworkHeight={artwork.height}
artworkId={artwork.id}
onClick={() => handleArtworkClick(artwork.id)}
/>
))}
</ArtworkGrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const AuthorAuction = () => {
{auction.status === 'BID'
? '경매완료'
: auction.status === 'PARTICIPATE'
? '참여중'
? '입찰중'
: auction.status}
</TableCell>
</TableRow>
Expand Down
Loading