Skip to content

Commit fc50741

Browse files
authored
Merge pull request #37 from happbob/feat/OODD-52
Design: MyPost UI 수정
2 parents 987457b + bfb1edc commit fc50741

3 files changed

Lines changed: 31 additions & 37 deletions

File tree

src/pages/MyPost/index.tsx

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import {
1313
Image,
1414
IconRow,
1515
IconWrapper,
16-
BrandBoxContainer,
17-
BrandBox,
18-
BrandLink,
16+
ClothingInfoContainer,
1917
Tab,
2018
ContentContainer,
2119
UserItem,
@@ -28,13 +26,12 @@ import {
2826

2927
import TopBar from '../../components/TopBar';
3028
import { OODDFrame } from '../../components/Frame/Frame';
31-
import { StyledText } from '../../components/Text/StyledText';
3229
import ConfirmationModal from '../../components/ConfirmationModal';
3330
import BottomSheet from '../../components/BottomSheet';
3431
import { BottomSheetProps } from '../../components/BottomSheet/dto';
3532
import BottomSheetMenu from '../../components/BottomSheetMenu';
3633
import { BottomSheetMenuProps } from '../../components/BottomSheetMenu/dto';
37-
import theme from '../../styles/theme';
34+
import ClothingInfoCard from '../Post/ClothingInfoCard';
3835

3936
import imageBasic from '../../assets/imageBasic.svg';
4037
import back from '../../assets/back.svg';
@@ -374,24 +371,17 @@ const MyPost: React.FC = () => {
374371
<span>{postDetail?.comments?.length || 0}</span> {/* 댓글 수 */}
375372
</IconWrapper>
376373
</IconRow>
377-
<BrandBoxContainer>
378-
{postDetail?.clothingInfo?.map((clothing, index) => (
379-
<BrandBox key={index}>
380-
<img src={clothing.imageUrl || mockImage} alt="브랜드 이미지" />
381-
<div>
382-
<StyledText $textTheme={{ style: 'body2-light', lineHeight: 1 }} color={theme.colors.black}>
383-
{clothing.brand}
384-
</StyledText>
385-
<BrandLink>
386-
<StyledText $textTheme={{ style: 'body6-light', lineHeight: 1 }} color={theme.colors.gray4}>
387-
{clothing.model}/{clothing.modelNumber}/<a href={clothing.url}>URL</a>
388-
</StyledText>
389-
</BrandLink>
390-
</div>
391-
<img src={nextIcon} alt="Next Icon" className="next-icon" />
392-
</BrandBox>
374+
<ClothingInfoContainer>
375+
{postDetail?.clothingInfo?.map((clothingInfo, index: number) => (
376+
<ClothingInfoCard
377+
key={index}
378+
imageUrl={clothingInfo.imageUrl}
379+
brand={clothingInfo.brand}
380+
model={clothingInfo.model}
381+
url={clothingInfo.url}
382+
/>
393383
))}
394-
</BrandBoxContainer>
384+
</ClothingInfoContainer>
395385
</PostDetailContainer>
396386
</OODDFrame>
397387
);

src/pages/MyPost/styles.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,18 @@ export const Menu = styled.div`
6767
`;
6868

6969
export const ImageWrapper = styled.div`
70+
position: relative;
7071
margin-top: 0px; /* 1.25rem */
7172
width: 100%;
7273
display: flex;
7374
justify-content: center;
7475
`;
7576

7677
export const Image = styled.img`
77-
max-width: 512px;
78-
width: 390px;
79-
height: 519.326px;
80-
flex-shrink: 0;
78+
width: 100%;
79+
aspect-ratio: 3 / 4;
80+
height: auto;
81+
object-fit: cover;
8182
`;
8283

8384
export const IconRow = styled.div`
@@ -105,28 +106,29 @@ export const IconWrapper = styled.div`
105106
}
106107
`;
107108

108-
export const BrandBoxContainer = styled.div`
109+
export const ClothingInfoContainer = styled.div`
109110
display: flex;
110111
overflow-x: auto; /* 가로 스크롤 가능하도록 설정 */
111112
white-space: nowrap; /* 줄바꿈 없이 한 줄로 나열 */
112113
padding: 0.625rem 0;
113-
margin-top: 16px; /* 상단과의 간격 */
114+
//margin-top: 16px; /* 상단과의 간격 */
114115
padding: 0px 20px; /* 1.25rem */
115116
116117
&::-webkit-scrollbar {
117118
height: 0rem;
118119
}
119120
`;
120121

122+
/*
121123
export const BrandBox = styled.div`
122-
display: inline-flex; /* inline-flex를 사용하여 가로 배치 유지 */
124+
display: inline-flex; // inline-flex를 사용하여 가로 배치 유지
123125
align-items: center;
124126
padding: 0.625rem;
125127
border: 0.0625rem solid #7b7b7b;
126128
margin-right: 0.625rem;
127-
width: 15.3243rem; /* 지정된 너비 */
128-
height: 4.5rem; /* 지정된 높이 */
129-
flex-shrink: 0; /* 크기 고정 */
129+
width: 15.3243rem; // 지정된 너비
130+
height: 4.5rem; // 지정된 높이
131+
flex-shrink: 0; // 크기 고정
130132
131133
img {
132134
width: 3.125rem;
@@ -138,17 +140,17 @@ export const BrandBox = styled.div`
138140
display: flex;
139141
flex-direction: column;
140142
justify-content: center;
141-
flex-grow: 1; /* 텍스트 영역 확장 */
143+
flex-grow: 1; /./ 텍스트 영역 확장
142144
}
143145
144146
&:last-child {
145147
margin-right: 0;
146148
}
147149
148150
.next-icon {
149-
width: 1.875rem; /* 아이콘 크기 */
151+
width: 1.875rem; // 아이콘 크기
150152
height: 19px;
151-
margin-left: auto; /* 자동으로 오른쪽 끝으로 배치 */
153+
margin-left: auto; // 자동으로 오른쪽 끝으로 배치
152154
}
153155
`;
154156
@@ -158,6 +160,7 @@ export const BrandLink = styled.div`
158160
justify-content: space-between;
159161
width: 100%;
160162
`;
163+
*/
161164

162165
export const TabContainer = styled.div`
163166
display: flex;
@@ -240,7 +243,7 @@ export const Arrow = styled.div<{ direction: string; disabled: boolean }>`
240243

241244
export const Indicator = styled.div`
242245
position: absolute;
243-
bottom: 10px;
246+
top: 10px;
244247
left: 50%;
245248
transform: translateX(-50%);
246249
background-color: rgba(0, 0, 0, 0.5);

src/pages/Post/styles.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ export const PostImg = styled.div`
143143
top: 0;
144144
left: 0;
145145
width: 100%;
146-
height: 100%;
146+
aspect-ratio: 3 / 4;
147+
height: auto;
147148
object-fit: cover;
148149
}
149150
`;

0 commit comments

Comments
 (0)