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) => {
|
const handleRatingChange = async (isUpvote: boolean) => {
|
||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
requireAuthentication(async () => {
|
requireAuthentication(async () => {
|
||||||
|
try {
|
||||||
await createReaction({
|
await createReaction({
|
||||||
kind: isUpvote ? ReactionKind.Like : ReactionKind.Dislike,
|
kind: isUpvote ? ReactionKind.Like : ReactionKind.Dislike,
|
||||||
shout: props.shout.id,
|
shout: props.shout.id,
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.warn(error)
|
||||||
|
}
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
loadShout(props.shout.slug)
|
loadShout(props.shout.slug)
|
||||||
loadReactionsBy({
|
loadReactionsBy({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user