mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 18:09:40 +05:00
fix: comment voting
This commit is contained in:
parent
a4618124ea
commit
e6271f20d9
3 changed files with 2 additions and 6 deletions
|
@ -64,14 +64,12 @@ export const CommentsComment = (props: {
|
|||
setLikes(likes - 2);
|
||||
_sendVote(1);
|
||||
} else {
|
||||
_sendVote(vote);
|
||||
setVote(0);
|
||||
_sendVote(0);
|
||||
if (action === "dislike" && vote == 1) {
|
||||
setLikes(likes + 1);
|
||||
} else if (action === "like" && vote == 2) {
|
||||
setLikes(likes - 1);
|
||||
} else {
|
||||
setLikes(props.comment.likes_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue