mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 01:49:40 +05:00
fix: comment voting
This commit is contained in:
parent
a4618124ea
commit
e6271f20d9
3 changed files with 2 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
export const API_URL = "https://api.anixart.tv";
|
||||
export const API_PREFIX = "/api";
|
||||
export const USER_AGENT =
|
||||
"AnixartApp/8.2.1-23121216 (Android 11; SDK 30; arm64-v8a;)";
|
||||
"AnixartApp/8.2.1-23121216 (Android 9; SDK 28; arm64-v8a; samsung SM-G975N; en)";
|
||||
|
||||
export const ENDPOINTS = {
|
||||
release: {
|
||||
|
|
|
@ -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