-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
157 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ | |
color: #34c759; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ | |
justify-items: center; | ||
gap: 20px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import './postsIdeaMarket.module.scss'; | ||
|
||
interface PurchaseRecord { | ||
id: string; | ||
paymentMethod: string; | ||
amount: number; | ||
} | ||
|
||
interface PostIdeaMarketProps { | ||
title: string; | ||
price: number; | ||
purchaseRecords: PurchaseRecord[]; | ||
} | ||
|
||
function PostIdeaMarket({ | ||
title, | ||
price, | ||
purchaseRecords, | ||
}: PostIdeaMarketProps) { | ||
return ( | ||
<div className='postcard-details'> | ||
<div className='postcard-header'> | ||
<div className='image-placeholder'>이미지</div> | ||
<div className='postcard-info'> | ||
<h1>{title}</h1> | ||
<p>{price.toLocaleString()} 원</p> | ||
</div> | ||
</div> | ||
|
||
<h2>구매 현황</h2> | ||
<table className='purchase-table'> | ||
<thead> | ||
<tr> | ||
<th>아이디</th> | ||
<th>거래 방식</th> | ||
<th>지불 금액</th> | ||
<th>액션</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{purchaseRecords.map((record) => ( | ||
<tr key={record.id}> | ||
<td>{record.id}</td> | ||
<td>{record.paymentMethod}</td> | ||
<td>{record.amount.toLocaleString()}</td> | ||
<td> | ||
<button className='message-button'>메시지 보내기</button> | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
|
||
<div className='postcard-actions'> | ||
<button className='edit-button'>수정하기</button> | ||
<button className='delete-button'>삭제</button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default PostIdeaMarket; |
85 changes: 85 additions & 0 deletions
85
src/pages/mypage/PostsIdeaMarket/postsIdeaMarket.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
.postcard-details { | ||
padding: 20px; | ||
font-family: Arial, sans-serif; | ||
|
||
.postcard-header { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 20px; | ||
|
||
.image-placeholder { | ||
width: 100px; | ||
height: 100px; | ||
background-color: #f0f0f0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin-right: 20px; | ||
} | ||
|
||
.postcard-info { | ||
h1 { | ||
font-size: 1.5rem; | ||
margin: 0; | ||
} | ||
|
||
p { | ||
font-size: 1.2rem; | ||
color: #555; | ||
} | ||
} | ||
} | ||
|
||
h2 { | ||
font-size: 1.4rem; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.purchase-table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-bottom: 20px; | ||
|
||
th, | ||
td { | ||
border: 1px solid #ccc; | ||
padding: 10px; | ||
text-align: left; | ||
} | ||
|
||
th { | ||
background-color: #f9f9f9; | ||
} | ||
} | ||
|
||
.postcard-actions { | ||
display: flex; | ||
gap: 10px; | ||
|
||
.edit-button, | ||
.delete-button { | ||
padding: 10px 20px; | ||
border: none; | ||
cursor: pointer; | ||
font-size: 1rem; | ||
} | ||
|
||
.edit-button { | ||
background-color: #007bff; | ||
color: #fff; | ||
} | ||
|
||
.delete-button { | ||
background-color: #dc3545; | ||
color: #fff; | ||
} | ||
} | ||
|
||
.message-button { | ||
padding: 5px 10px; | ||
border: none; | ||
background-color: #28a745; | ||
color: #fff; | ||
cursor: pointer; | ||
} | ||
} |