Merge pull request #9 from snowykami/fix/1-comment-queue

fix: Closes #4 修复评论发布时之前的评论被移出列表的问题
This commit is contained in:
2025-09-12 13:13:29 +08:00
committed by GitHub

View File

@ -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]);