mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 19:16:24 +00:00
fix: Closes #4 修复评论发布时之前的评论被移出列表的问题
This commit is contained in:
@ -71,7 +71,6 @@ export function CommentSection(
|
||||
}).then(res => {
|
||||
toast.success(t("comment_success"));
|
||||
setTotalCommentCount(c => c + 1);
|
||||
setComments(prevComments => prevComments.slice(0, -1));
|
||||
getComment({ id: res.data.id }).then(response => {
|
||||
console.log("New comment fetched:", response.data);
|
||||
setComments(prevComments => [response.data, ...prevComments]);
|
||||
|
Reference in New Issue
Block a user