Fix: corrigir tela branca de conexão no Realtime

This commit is contained in:
Sidney 2026-04-19 17:44:38 -03:00
parent c364e81f3b
commit c3c0ede8f0
1 changed files with 8 additions and 1 deletions

View File

@ -12,10 +12,17 @@
// Detecta se está configurado (sempre true no self-hosted) // Detecta se está configurado (sempre true no self-hosted)
export const isSupabaseConfigured = () => true; export const isSupabaseConfigured = () => true;
// Objeto dummy para compatibilidade com imports legados
export const supabase = { export const supabase = {
from: () => { throw new Error('Self-Hosted: Use as funções HTTP em vez de supabase.from()'); }, from: () => { throw new Error('Self-Hosted: Use as funções HTTP em vez de supabase.from()'); },
storage: { from: () => { throw new Error('Self-Hosted: Use as funções de upload HTTP'); } }, storage: { from: () => { throw new Error('Self-Hosted: Use as funções de upload HTTP'); } },
channel: () => {
const mockChannel = {
on: () => mockChannel,
subscribe: (cb: any) => { if(cb) cb('SUBSCRIBED'); return mockChannel; }
};
return mockChannel;
},
removeChannel: () => {},
}; };
/** /**