upvote-disabling
This commit is contained in:
parent
83cb23d424
commit
cc04e13be4
|
@ -62,6 +62,7 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
|
||||||
|
|
||||||
const handleRatingChange = async (isUpvote: boolean) => {
|
const handleRatingChange = async (isUpvote: boolean) => {
|
||||||
requireAuthentication(async () => {
|
requireAuthentication(async () => {
|
||||||
|
setIsLoading(true)
|
||||||
if (isUpvoted()) {
|
if (isUpvoted()) {
|
||||||
await deleteShoutReaction(ReactionKind.Like)
|
await deleteShoutReaction(ReactionKind.Like)
|
||||||
} else if (isDownvoted()) {
|
} else if (isDownvoted()) {
|
||||||
|
@ -77,6 +78,8 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
|
||||||
loadReactionsBy({
|
loadReactionsBy({
|
||||||
by: { shout: props.shout.slug },
|
by: { shout: props.shout.slug },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
setIsLoading(false)
|
||||||
}, 'vote')
|
}, 'vote')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user