update add lib,
This commit is contained in:
16
03_source/frontend/src/lib/supabase.ts
Normal file
16
03_source/frontend/src/lib/supabase.ts
Normal 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>);
|
Reference in New Issue
Block a user