How can I create a button that increases the number of likes on a post by one and decreases it by one when clicked again? It also must go from a hollow heart (when not clicked) to a filled heart (when clicked)
Hi @hezeking,
First, in your data, you create 4 columns :
- Number Column for Likes
- Image Column for hollow heart (IMG 1)
- Image Column for filled heart (IMG 2)
- If-Then-Else Column with this : If Likes > 0 then “IMG2” else “IMG1”
Something like that :
After, in your layout, add a component image with the If-then-else column
Finally, you must create an action like this :
The result must be something like this :
1 Like