Would anybody who has made a user ‘follow’ or content ‘like’ in Adalo/Xano kindly explain their process? I am struggling with the UX toggle aspect. Toggles cannot update a relationship field in Xano.
I am currently using a JOIN table and endpoint that is triggered by a custom action to add or delete a record. This works well but how to update the UX to reflect a ‘liked’ post, or attending and event or something similar.
Xano is great but I can’t help thinking how half baked this integration is.
Table refs from Xano when used as addons become mostly useless between screens.
I have it done as follows.
I have a likes table in Xano.
In Adalo I have 2 hearts, one filled and the other not, both with conditional visibility.
The empty heart is shown when the amount of records in the likes table (with is id_user and id_post) is equal to zero.
When the user clicks on Like, a record is created in the table (with his id_user and the id of the post) and at that moment the value of the number of records is no longer zero and the empty heart is hidden and the full heart is shown.
For the unlike, I make a call to Xano with the id_user and the id_post, I make a query in the likes table that match with that data and I delete the record that I find.