Skip to content

Commit c8451e8

Browse files
authored
Merge pull request #85 from oodd-team/feat/OD-134
[OD-134] myPage UI 수정
2 parents 1bd1d97 + 8656800 commit c8451e8

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

src/pages/MyPage/ButtonSecondary/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ButtonSecondary: React.FC = () => {
88
const navigate = useNavigate();
99

1010
const handleClick = () => {
11-
navigate('/profile/edit'); // 경로 수정했음
11+
navigate('/profile/edit');
1212
};
1313

1414
return (

src/pages/MyPage/ButtonSecondary/styles.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import styled from 'styled-components';
22

33
export const Button = styled.button`
44
width: 100%;
5-
padding: 6px;
65
margin: 1.25rem auto;
7-
height: 3.1rem; /* 44px */
6+
height: 3.1rem;
87
text-align: center;
98
color: #ff2389;
109
cursor: pointer;
1110
box-sizing: border-box;
1211
border: 1px solid;
1312
border-radius: 10px;
1413
border-color: #ff2389;
15-
padding: 10px; /* 텍스트가 보더와 겹치지 않게 패딩 설정 */
14+
padding: 10px;
1615
`;

src/pages/MyPage/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
StatLabel,
1010
PostsContainer,
1111
AddButton,
12+
NoPostWrapper,
1213
} from "./styles";
1314
import { OODDFrame } from '../../components/Frame/Frame';
1415
import NavbarProfile from '../../components/NavbarProfile';
@@ -25,6 +26,7 @@ import button_plus from '../../assets/default/plus.svg';
2526
import insta from '../../assets/default/insta.svg';
2627
import photo from '../../assets/default/photo.svg';
2728
import UserProfile from '../../components/UserProfile';
29+
import { StyledText } from '../../components/Text/StyledText';
2830

2931
import { getUserPostListApi } from "../../apis/post";
3032
import { UserPostSummary } from "../../apis/post/dto";
@@ -161,7 +163,12 @@ const MyPage: React.FC = () => {
161163
.sort((a, b) => Number(b.isRepresentative) - Number(a.isRepresentative))
162164
.map((post) => <PostItem key={post.postId} post={post} />)
163165
) : (
164-
<p>게시물이 없습니다.</p>
166+
<NoPostWrapper>
167+
<StyledText $textTheme={{ style: 'headline1-medium' }} color="#8e8e93">
168+
게시물이 없어요.
169+
</StyledText>
170+
</NoPostWrapper>
171+
165172
)}
166173
</PostsContainer>
167174
<NavBar />

src/pages/MyPage/styles.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,12 @@ export const AddButton = styled.button`
7474
border-radius: 50%;
7575
z-index: 2;
7676
`;
77+
78+
export const NoPostWrapper = styled.div`
79+
width: 100%;
80+
height: 100%;
81+
display: flex;
82+
justify-content: center;
83+
align-items: center;
84+
margin-top: 80px;
85+
`;

0 commit comments

Comments
 (0)