mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-25 18:46:23 +00:00
fix: 修复点赞功能中的状态管理,确保用户操作后可以再次点击
All checks were successful
Push to Helm Chart Repository / build (push) Successful in 12s
All checks were successful
Push to Helm Chart Repository / build (push) Successful in 12s
This commit is contained in:
@ -70,10 +70,11 @@ export function CommentItem(
|
||||
toast.success(res.data.status ? t("like_success") : t("unlike_success"));
|
||||
setLiked(res.data.status);
|
||||
setLikeCount(res.data.status ? likeCount + 1 : likeCount - 1);
|
||||
setCanClickLike(true);
|
||||
}).catch(error => {
|
||||
toast.error(t("like_failed") + ": " + error.message);
|
||||
setCanClickLike(true);
|
||||
});
|
||||
setCanClickLike(true);
|
||||
}
|
||||
|
||||
const reloadReplies = () => {
|
||||
|
Reference in New Issue
Block a user