update add lib,

This commit is contained in:
louiscklaw
2025-06-13 13:19:15 +08:00
parent 5b7cf25753
commit 5a531e1288
3 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import type { SupabaseClient } from '@supabase/supabase-js';
import { createClient } from '@supabase/supabase-js';
import { CONFIG } from 'src/global-config';
// ----------------------------------------------------------------------
const isSupabase = CONFIG.auth.method === 'supabase';
const supabaseUrl = CONFIG.supabase.url;
const supabaseKey = CONFIG.supabase.key;
export const supabase = isSupabase
? createClient(supabaseUrl, supabaseKey)
: ({} as SupabaseClient<any, 'public', any>);