Skip to content

Commit

Permalink
chore: 댓글 작성 후 해당 컴포넌트 스크롤 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bae-sh committed Jan 1, 2024
1 parent 57ca696 commit 627d97b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/components/common/Post/CommentUpload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export default function CommentUpload({ user }: IComentUpload) {
return;
}
mutate(content, {
onSuccess: resetForm,
onSuccess: () => {
resetForm();
setTimeout(() => window.scrollTo(0, document.body.scrollHeight), 100);
},
onError: () =>
openModal({ type: ModalType.ERROR, message: errorMessage.tryAgain }),
});
Expand Down

0 comments on commit 627d97b

Please sign in to comment.