Skip to content

Commit

Permalink
style: Prettier를 사용해 코드 포맷팅 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
gaaahee committed Jan 18, 2025
1 parent 923693b commit 008a8a3
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/dropdown/dropdown.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
justify-content: space-between;
align-items: center;
border-radius: 5px;
height : 40px;
height: 40px;
border-radius: 5px;
height : 40px;
height: 40px;
}

.arrow {
Expand All @@ -35,7 +35,7 @@
width: 25px;
height: 25px;
@include flex-center;
color : #616161;
color: #616161;
}

.selectBox.open .arrow {
Expand Down Expand Up @@ -66,4 +66,4 @@
&:hover {
background: #f0f0f0;
}
}
}
2 changes: 1 addition & 1 deletion src/components/postcard/PostCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@
color: #34c759;
}
}
}
}
6 changes: 4 additions & 2 deletions src/components/tab-navigation/tabNavigation.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
font-size: 20px;
text-align: center;
color: #999;
transition: background-color 0.3s, color 0.3s;
transition:
background-color 0.3s,
color 0.3s;
border-bottom: 2px solid transparent;

&.activeTab {
color: #007aff;
border-bottom: 3px solid #007aff;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/mypage/MyPagePosts/myPagePosts.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
justify-items: center;
gap: 20px;
}
}
}
62 changes: 62 additions & 0 deletions src/pages/mypage/PostsIdeaMarket/PostsIdeaMarket.tsx
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 src/pages/mypage/PostsIdeaMarket/postsIdeaMarket.module.scss
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;
}
}

0 comments on commit 008a8a3

Please sign in to comment.