Skip to content

Commit

Permalink
Merge pull request #293 from ODOICHON/feat/#290
Browse files Browse the repository at this point in the history
feat: ๋†๊ฐ€ ๊ฑฐ๋ž˜ ์ƒ์„ธ ํŽ˜์ด์ง€ UI ์ˆ˜์ •
  • Loading branch information
sangminlee98 authored Aug 18, 2024
2 parents ce5f366 + 6e70130 commit 6ee9081
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 11 deletions.
11 changes: 3 additions & 8 deletions src/components/Trade/Info/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dayjs from 'dayjs';
import { TradeBoardDetailType } from '@/types/Board/tradeType';
import { getHouseName, getRentalName } from '@/utils/utils';
import { getHouseName, getRentalName, priceCount } from '@/utils/utils';
import styles from './styles.module.scss';

// TODO: undefined ์ฒ˜๋ฆฌํ•˜๊ธฐ
Expand All @@ -22,18 +22,13 @@ function TradeBoardInfo({ info }: TradeBoardInfoProps) {
<div>
๊ฐ€๊ฒฉ{' '}
<p>
{info?.rentalType && getRentalName(info?.rentalType)} {info?.price}
๋งŒ์›
{info?.rentalType && getRentalName(info?.rentalType)}{' '}
{info?.price && priceCount(info?.price)}
</p>
</div>
<div>
์ „ํ™”๋ฒˆํ˜ธ <p>{info?.contact}</p>
</div>
{info?.userType === 'AGENT' && (
<div>
๊ณต์ธ์ค‘๊ฐœ์‚ฌ๋ช… <p>{info?.agentName !== '' ? info?.agentName : 'X'}</p>
</div>
)}
</article>
<article>
<span>๊ธฐ๋ณธ์ •๋ณด</span>
Expand Down
14 changes: 14 additions & 0 deletions src/pages/Trade/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,20 @@ export default function TradeBoardPage() {
>
<TradeBoardInfo info={data?.data} />
</section>
{data?.data.userType === 'AGENT' && (
<section className={styles.agentInfo}>
<article>
<div>
๊ณต์ธ์ค‘๊ฐœ์‚ฌ๋ช…{' '}
<p>{data.data.agentName !== '' ? data.data.agentName : 'X'}</p>
</div>
<div>
์ƒ์„ธ ์„ค๋ช…{' '}
<p>{data.data.agentDetail && data.data.agentDetail}</p>
</div>
</article>
</section>
)}
<section className={styles.recommendedTag}>
<article>
<span>๋งค๋ฌผ ํŠน์ง•</span>
Expand Down
40 changes: 37 additions & 3 deletions src/pages/Trade/Board/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
}

.infoContainer {
margin-bottom: 3rem;
margin-bottom: 1.25rem;
}
.categoryList {
display: flex;
Expand Down Expand Up @@ -199,12 +199,46 @@
}
}

.agentInfo {
display: flex;
padding: 3.75rem 4.375rem;
background-color: transparent;
border-radius: 10px;
margin-bottom: 1.25rem;
border: 1px solid #ced3d6;
border-radius: 8px;

@include mobile {
flex-direction: column;
gap: 5rem;
}
& > article {
display: flex;
flex-direction: column;
width: 100%;
font-size: 1.375rem;
font-family: 'Pretendard';
font-weight: bold;
gap: 1.125rem;
& > div {
display: flex;
color: #4d5256;
gap: 1rem;
& > p {
font-weight: normal;
}
}
}
}

.recommendedTag {
display: flex;
padding: 3.75rem 4.375rem;
background-color: #f8f8f8;
background-color: transparent;
border-radius: 10px;
margin-bottom: 6rem;
border: 1px solid #ced3d6;
border-radius: 8px;

@include mobile {
flex-direction: column;
Expand All @@ -228,7 +262,7 @@
flex-wrap: wrap;
gap: 1rem;

background-color: #f6f7fb;
background-color: transparent;
border-radius: 16px;
font-size: 1.125rem;
font-family: 'Pretandard';
Expand Down

0 comments on commit 6ee9081

Please sign in to comment.