|
import { createClient } from '@supabase/supabase-js'; |
|
import type { SupabaseClient } from '@supabase/supabase-js'; |
|
|
|
|
|
|
|
const supabaseUrl = process.env.SUPABASE_URL; |
|
const supabaseAnonKey = process.env.SUPABASE_ANON_KEY; |
|
|
|
const isSupabaseEnabled = supabaseUrl && supabaseAnonKey; |
|
|
|
|
|
export const supabase: SupabaseClient | null = isSupabaseEnabled |
|
? createClient(supabaseUrl, supabaseAnonKey) |
|
: null; |
|
|
|
|
|
|
|
if (!supabase) { |
|
console.warn( |
|
'Supabase environment variables (SUPABASE_URL, SUPABASE_ANON_KEY) are not set. Authentication features will be disabled.' |
|
); |
|
} |
|
|