Skip to content

Commit

Permalink
feature-072: 피드백 전송 시 입력란 초기화 하는 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
gs0428 committed Feb 17, 2024
1 parent 2d86e31 commit f5e8da2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/layout/footer/SendEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ const SendEmail = () => {
const handleInputFeedback = (e: React.ChangeEvent<HTMLInputElement>) =>
setFeedback(e.target.value);

const onSendFeedback = async () => await postFeedback(feedback);
const onSendFeedback = async () => {
const res = await postFeedback(feedback);
if (res.data.success) {
setFeedback('');
return;
}
alert('피드백을 전송하는 과정에서 오류가 발생했습니다.');
};

return (
<FooterStyle.SendEmailWrap>
Expand Down

0 comments on commit f5e8da2

Please sign in to comment.