Skip to content

Commit

Permalink
fix: 무한로딩 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seung365 committed Aug 6, 2024
1 parent 8539d9f commit 48b3576
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Mail/MailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ export const MailModal = ({ isOpen, onOpen, onClose }: MailModalProps) => {
console.log(data);
setTitle(data.title || '메일 생성 성공');
setContent(data.content || '메일이 성공적으로 생성되었습니다.');
setIsSubmitted(true);
setIsLoading(false);
},
onError: (error) => {
setTitle('메일 생성 실패');
setContent('메일 생성 중 오류가 발생했습니다.');
setIsSubmitted(true);
setIsLoading(false);
},
},
);
Expand Down Expand Up @@ -133,10 +137,14 @@ export const MailModal = ({ isOpen, onOpen, onClose }: MailModalProps) => {
console.log(data);
setTitle(data.title || '메일 생성 성공');
setContent(data.content || '메일이 성공적으로 생성되었습니다.');
setIsSubmitted(true);
setIsLoading(false);
},
onError: (error) => {
setTitle('메일 생성 실패');
setContent('메일 생성 중 오류가 발생했습니다.');
setIsSubmitted(true);
setIsLoading(false);
},
},
);
Expand Down

0 comments on commit 48b3576

Please sign in to comment.