Unable to get realtime data in local dev
Seems a bit unclear the format expected for filtering realtime on the docs; I'm trying to filter on my logged in users uuid:
// given `const userId: string = '';`
supaClient.channel(`public:user_profiles:user_id=eq.${userId}`)
.on(
"postgres_changes",
{
event: "*",
schema: "public",
table: "user_profiles",
filter: `user_id=eq.${userId}`, // <== here?
},
(payload) => {
setUserInfo({ ...userInfo, profile: payload.new as UserProfile });
}
)
.subscribe();