Upvote doesn't work after refresh

Hi, I’m having trouble with my upvote button.

I would like to have the following behavior:
I click on the upvote button => +1 and the color of the arrow turns blue.
I click again on the upvote button => -1 and the color of the arrow becomes normal again.
After a refresh everything works well

What I’ve got right now:

I click on the upvote button => +1 and the color of the arrow turns blue.
I click again on the upvote button => -1 and the color of the arrow becomes normal again.
After a refresh, I can downvote again and the color of the arrow is blue because it considers that I clicked on the button …

App Link : https://bubble.io/page?name=index&id=mappyapp&tab=tabs-1&subtab=General

Thanks for your help

I believe it is because your conditional is based on whether the Current UserUpvotes contains the card. In your downvote workflow, you have “add” - rather change this to remove the card from the CurrentUserUpvotes.

Thanks it’s working :slight_smile:

1 Like