Skip to content

Commit af367dd

Browse files
committed
Refactor: AccountSetting 스켈레톤 적용
1 parent 3f0aa01 commit af367dd

2 files changed

Lines changed: 31 additions & 9 deletions

File tree

src/pages/Account/AccountSetting/index.tsx

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import leave from '@assets/default/leave.svg';
1212
import Profile_s from '@assets/default/my-page.svg';
1313

1414
import { OODDFrame } from '@components/Frame/Frame';
15-
import Loading from '@components/Loading/index';
1615
import Modal from '@components/Modal';
16+
import Skeleton from '@components/Skeleton';
1717
import { StyledText } from '@components/Text/StyledText';
1818
import TopBar from '@components/TopBar/index';
1919

@@ -44,8 +44,7 @@ const AccountSetting: React.FC = () => {
4444
setIsLoading(false);
4545
}
4646
};
47-
48-
getUserInfo();
47+
setTimeout(getUserInfo, 1000);
4948
}, []);
5049

5150
const handleConfirmLogout = () => {
@@ -68,7 +67,33 @@ const AccountSetting: React.FC = () => {
6867
};
6968

7069
if (isLoading) {
71-
return <Loading />;
70+
return (
71+
<OODDFrame>
72+
<ProfileEditContainer>
73+
<TopBar text="계정 관리" LeftButtonSrc={back} onClickLeftButton={() => navigate(-1)} />
74+
<ProfilePicWrapper>
75+
<ProfilePic>
76+
<Skeleton width={120} height={120} borderRadius={80} />
77+
</ProfilePic>{' '}
78+
<Row>
79+
<Skeleton width="60%" height={20} />
80+
</Row>
81+
<Row>
82+
<Skeleton width="100%" height={20} />
83+
</Row>
84+
</ProfilePicWrapper>
85+
86+
<List>
87+
<ListItem>
88+
<Skeleton width="100%" height={40} />
89+
</ListItem>
90+
<ListItem>
91+
<Skeleton width="100%" height={40} />
92+
</ListItem>
93+
</List>
94+
</ProfileEditContainer>
95+
</OODDFrame>
96+
);
7297
}
7398

7499
return (

src/pages/Account/AccountSetting/styles.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ export const ProfilePicWrapper = styled.div`
1313
display: flex;
1414
flex-direction: column;
1515
align-items: center;
16-
margin-bottom: 1.25rem;
17-
margin-top: 24px;
1816
`;
1917

2018
export const ProfilePic = styled.div`
@@ -24,7 +22,6 @@ export const ProfilePic = styled.div`
2422
border-radius: 50%;
2523
overflow: hidden;
2624
margin-top: 2.125rem;
27-
margin-bottom: 1.375rem;
2825
2926
img {
3027
width: 100%;
@@ -42,7 +39,7 @@ export const Row = styled.div`
4239
justify-content: center;
4340
align-items: center;
4441
width: 100%;
45-
margin-bottom: 10px;
42+
margin-top: 10px;
4643
4744
${Label} {
4845
width: auto;
@@ -67,7 +64,7 @@ export const List = styled.ul`
6764
export const ListItem = styled.li`
6865
display: flex;
6966
align-items: center;
70-
padding: 15px 1.25rem;
67+
padding: 15px 10px;
7168
border-bottom: 0px solid ${({ theme }) => theme.colors.background.divider};
7269
cursor: pointer;
7370

0 commit comments

Comments
 (0)