enable-after-fail
This commit is contained in:
parent
e4332128c8
commit
64af217dd7
|
@ -54,10 +54,14 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
|
|||
const handleRatingChange = async (isUpvote: boolean) => {
|
||||
setIsLoading(true)
|
||||
requireAuthentication(async () => {
|
||||
await createReaction({
|
||||
kind: isUpvote ? ReactionKind.Like : ReactionKind.Dislike,
|
||||
shout: props.shout.id,
|
||||
})
|
||||
try {
|
||||
await createReaction({
|
||||
kind: isUpvote ? ReactionKind.Like : ReactionKind.Dislike,
|
||||
shout: props.shout.id,
|
||||
})
|
||||
} catch (error) {
|
||||
console.warn(error)
|
||||
}
|
||||
setIsLoading(false)
|
||||
loadShout(props.shout.slug)
|
||||
loadReactionsBy({
|
||||
|
|
Loading…
Reference in New Issue
Block a user