Clint Crowe
ย ยทย tech for farmers built by farmers

Yet another conditional visibility question...

This one seems to trip up a lot of folks so yes, I have one more to throw in the mix. This one is complicated but it looks like everything works great except the visibility. I have an api call that goes back to a function in supabase. this is for notifications. it pulls the notifications in just fine and it also runs a script in the function to check the time they checked the notification against the last time of a notification being entered. if the the notification is of at time before the last they checked then there is a variable that comes across that is is_new. its boolean so it comes as false if it is old and true if new. thats all working great when i test it in the api window. When i close the notification page it sends the timestamp to the profile table. that all works great. i can see when i add a new message it comes over as true. when i go to the notification page and close the page it updates the timestamp and the api sends false over as is_new. all good.

but, i setup the container that i want to use as the new notification and tried to put a condition on it. it thought that if i just put is set on it that it would show and if it wasnt set it would not show, ie true set, false, not set. but that doesnt work. i still get the container showing even when the is_new is set to false.

thoughts?

1