Skip to content

Commit

Permalink
Merge pull request #139 from Dev-FE-1/bug/profile-edit
Browse files Browse the repository at this point in the history
[Bug] 프로필 수정 페이지 빈 닉네임 허용 x
  • Loading branch information
devdeun authored Sep 9, 2024
2 parents ad5ac08 + 65bb48b commit 640189a
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="primary" onClick={handleSaveProfile}>
<FullButton
styleType={name.trim() !== '' ? 'primary' : 'disabled'}
onClick={handleSaveProfile}
>
수정하기
</FullButton>
<FullButton styleType="cancel" onClick={handleCancel}>
Expand Down

0 comments on commit 640189a

Please sign in to comment.