Hello
One my the page I’m building can be browsed by authenticated and anonymous users.
Auth users do have some specific div hidden to the anonymous ones, thanks to the “Conditional rendering” feature.
To fill this div, I must fetch a collection from Supabase with some filters like the user_id.
When the user browsing my page is anonymous, even if the div is not rendered, Weweb is fetching the collection and it returns an error “22P02”, because the user_id cannot be provided to the collection filter.
Is there a way to avoid fetching this collection for anonymous users, and automatically fetch it once the div is rendered?
So far, I think I can only remove the “fetch automatically” flag from the collection. And fetch the collection in the “on page load” workflow. Meaning, I have always to fetch this collection manually.
Any other smart/automatic way I’m not aware of?
Thanks for your help