Skip to content

Commit

Permalink
feat: 프로필 수정 페이지 로딩 스피너 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjichoe committed Sep 9, 2024
1 parent 6661756 commit 65bb48b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/playlistDetail/PlaylistInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ const verticalButtonStyle = css`
margin-top: 2px;
`;

export default PlaylistInfo;
export default PlaylistInfo;
12 changes: 10 additions & 2 deletions src/pages/ProfileEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Avatar from '@/components/common/Avatar';
import FullButton from '@/components/common/buttons/FullButton';
import Input from '@/components/common/inputs/Input';
import Textarea from '@/components/common/inputs/Textarea';
import Spinner from '@/components/common/loading/Spinner';
import BackHeader from '@/components/layout/header/BackHeader';
import { useAuth } from '@/hooks/useAuth';
import { useUserData } from '@/hooks/useUserData';
Expand Down Expand Up @@ -72,7 +73,11 @@ const ProfileEditPage: React.FC = () => {
};

if (!initialUserData) {
return <div>Loading...</div>;
return (
<div>
<Spinner />
</div>
);
}

return (
Expand Down Expand Up @@ -113,7 +118,10 @@ const ProfileEditPage: React.FC = () => {
/>
</div>
<div css={buttonContainerStyle}>
<FullButton styleType={name.trim() !== '' ? "primary" : "disabled"} onClick={handleSaveProfile}>
<FullButton
styleType={name.trim() !== '' ? 'primary' : 'disabled'}
onClick={handleSaveProfile}
>
수정하기
</FullButton>
<FullButton styleType="cancel" onClick={handleCancel}>
Expand Down

0 comments on commit 65bb48b

Please sign in to comment.