setup supabase and dev QoL features
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { Database } from '@/types/supabase'
|
||||
import { createClient } from '@supabase/supabase-js'
|
||||
|
||||
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
|
||||
const supabasePublishableKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
|
||||
|
||||
if (!supabaseUrl || !supabasePublishableKey) {
|
||||
throw new Error('Missing Supabase env variables. Check your .env file.')
|
||||
}
|
||||
|
||||
const supabase = createClient<Database>(supabaseUrl, supabasePublishableKey)
|
||||
|
||||
export function useSupabase() {
|
||||
return supabase
|
||||
}
|
||||
Reference in New Issue
Block a user