Skip to content

Commit 3f0aa01

Browse files
committed
Refactor: profileEdit 스켈레톤 적용
1 parent 236f5af commit 3f0aa01

1 file changed

Lines changed: 53 additions & 4 deletions

File tree

src/pages/Profile/ProfileEdit/index.tsx

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import imageBasic from '@assets/default/defaultProfile.svg';
1515

1616
import BottomButton from '@components/BottomButton/index';
1717
import { OODDFrame } from '@components/Frame/Frame';
18-
import Loading from '@components/Loading/index';
1918
import Modal from '@components/Modal/index';
19+
import Skeleton from '@components/Skeleton';
2020
import { StyledText } from '@components/Text/StyledText';
2121
import TopBar from '@components/TopBar/index';
2222

@@ -83,7 +83,7 @@ const ProfileEdit: React.FC = () => {
8383
}
8484
};
8585

86-
getUserInfo();
86+
setTimeout(getUserInfo, 1000);
8787
}, []);
8888

8989
const handleButtonClick = () => {
@@ -155,7 +155,56 @@ const ProfileEdit: React.FC = () => {
155155
};
156156

157157
if (isLoading || uploading) {
158-
return <Loading />;
158+
return (
159+
<OODDFrame>
160+
<ProfileEditContainer>
161+
<TopBar text="회원정보 수정" LeftButtonSrc={back} onClickLeftButton={() => navigate(-1)} />
162+
<ProfilePicWrapper>
163+
<Skeleton width={120} height={120} borderRadius={80} />
164+
</ProfilePicWrapper>
165+
<UserInfo>
166+
<Skeleton width={100} height={30} />
167+
</UserInfo>
168+
<Row>
169+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
170+
이름
171+
</StyledText>
172+
<Skeleton width="100%" height={60} />
173+
</Row>
174+
<Row>
175+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
176+
닉네임
177+
</StyledText>
178+
<Skeleton width="100%" height={60} />
179+
</Row>
180+
<Row>
181+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
182+
소개글
183+
</StyledText>
184+
<Skeleton width="100%" height={60} />
185+
</Row>
186+
<Row>
187+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
188+
전화번호
189+
</StyledText>
190+
<Skeleton width="100%" height={60} />
191+
</Row>
192+
<Row>
193+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
194+
생년월일
195+
</StyledText>
196+
<Skeleton width="100%" height={60} />
197+
</Row>
198+
<Row>
199+
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
200+
이메일
201+
</StyledText>
202+
<Skeleton width="100%" height={60} />
203+
</Row>
204+
<BottomButton content="완료" onClick={handleSave} disabled={isLoading || uploading} />
205+
</ProfileEditContainer>
206+
</OODDFrame>
207+
);
159208
}
160209

161210
return (
@@ -222,7 +271,7 @@ const ProfileEdit: React.FC = () => {
222271
</StyledText>
223272
<EmailInput type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
224273
</Row>
225-
<BottomButton content="완료" onClick={handleSave} />
274+
<BottomButton content="완료" onClick={handleSave} disabled={isLoading || uploading} />
226275
</ProfileEditContainer>
227276
</OODDFrame>
228277
);

0 commit comments

Comments
 (0)