MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / createClient

Function createClient

frontend/src/utils/supabase/client.ts:3–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { createBrowserClient } from '@supabase/ssr'
2
3export function createClient() {
4 const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL
5 const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
6
7 if (!supabaseUrl || !supabaseAnonKey) {
8 throw new Error(
9 'Missing Supabase environment variables. Please set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY.'
10 )
11 }
12
13 return createBrowserClient(
14 supabaseUrl,
15 supabaseAnonKey
16 )
17}

Callers 5

SoundboardSoundClipsFunction · 0.90
SoundboardTTSPresetsFunction · 0.90
SoundClipsWidgetFunction · 0.90
createSupabaseApiClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected