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) => {
|
||||
requireAuthentication(async () => {
|
||||
setIsLoading(true)
|
||||
if (isUpvoted()) {
|
||||
await deleteShoutReaction(ReactionKind.Like)
|
||||
} else if (isDownvoted()) {
|
||||
|
@ -77,6 +78,8 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
|
|||
loadReactionsBy({
|
||||
by: { shout: props.shout.slug },
|
||||
})
|
||||
|
||||
setIsLoading(false)
|
||||
}, 'vote')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user