Skip to content

Commit

Permalink
add alert user data update error
Browse files Browse the repository at this point in the history
  • Loading branch information
christie26 committed Dec 16, 2023
1 parent 602f82c commit 1b44a2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion project/frontend/src/components/profile/ProfileEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const ProfileEditModal: React.FC<ModalProfileProps> = ({
fetchData();
onClose();
} catch (error) {
alert(`${error.error.message}`);
console.error('Error saving changes:', error);
}
}, [api, newData, onClose, fetchData]);
Expand All @@ -57,7 +58,9 @@ export const ProfileEditModal: React.FC<ModalProfileProps> = ({
onClose();
} catch (error: any) {
if (error.status === 400) {
openMessage('비밀번호는 6-12자의 영문, 숫자, 하이픈(-), 언더스코어(_)만 사용 가능합니다');
openMessage(
'비밀번호는 6-12자의 영문, 숫자, 하이픈(-), 언더스코어(_)만 사용 가능합니다',
);
}
console.error('Error send password:', error);
}
Expand Down

0 comments on commit 1b44a2f

Please sign in to comment.