I'm struggling to implement an idea. If a user is logged in, I want to show a hidden div.
For example in firebase I can do this:
firebase.auth.signInAnonymessly()
// Detecting if the auth state changed
firebase.auth.onAuthStateChanged((user) => {
// If a user exists show him a hidden div
if(user) {
HiddenDiv.style.display = block
}
})
I want to do this but in supabase
I searched the supabase docs and didn't find anything pls help