()
| 8 | |
| 9 | /** Single Supabase client for realtime tunnels (avoids duplicate GoTrueClient warnings). */ |
| 10 | export function getSupabaseClient(): SupabaseClient { |
| 11 | if (sharedClient) return sharedClient; |
| 12 | |
| 13 | const url = import.meta.env.VITE_SUPABASE_URL || DEFAULT_URL; |
| 14 | const anonKey = import.meta.env.VITE_SUPABASE_ANON_KEY || DEFAULT_ANON_KEY; |
| 15 | sharedClient = createClient(url, anonKey, { |
| 16 | realtime: { params: { eventsPerSecond: 10 } }, |
| 17 | }); |
| 18 | return sharedClient; |
| 19 | } |
no outgoing calls
no test coverage detected