mirror of
https://github.com/nagaoo0/HabbitGrid.git
synced 2026-01-12 07:54:53 +00:00
Add supabase setup
This commit is contained in:
11
src/lib/supabase.js
Normal file
11
src/lib/supabase.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
// Expect env vars provided by Vite
|
||||
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
|
||||
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
||||
|
||||
export const supabase = (supabaseUrl && supabaseAnonKey)
|
||||
? createClient(supabaseUrl, supabaseAnonKey)
|
||||
: null;
|
||||
|
||||
export const isSupabaseConfigured = () => Boolean(supabase);
|
||||
Reference in New Issue
Block a user