Skip to content

Commit

Permalink
fix: 댓글 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
100Gyeon committed Dec 9, 2023
1 parent b5e01c3 commit 450e8d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/feed/FeedCommentInput/FeedCommentInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const FeedCommentInput = forwardRef<HTMLTextAreaElement, FeedCommentInputProps>(
event.preventDefault();

if (!comment.trim()) return;
onSubmit(comment).then(() => setComment(''));
onSubmit(comment).then(() => {
setComment('');
setIsFocused(false);
});
};

return (
Expand All @@ -37,7 +40,6 @@ const FeedCommentInput = forwardRef<HTMLTextAreaElement, FeedCommentInputProps>(
value={comment}
onChange={handleChange}
onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)}
placeholder={`${writerName}님의 피드에 댓글을 남겨보세요!`}
rows={1}
/>
Expand Down

0 comments on commit 450e8d8

Please sign in to comment.