Add user authentication with login/signup/protected routes, boss pokemon detail fields and result team tracking, moves and abilities selector components and API, run ownership and visibility controls, and various UI improvements across encounters, run list, and journal pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
541 B
TypeScript
15 lines
541 B
TypeScript
import { createClient, type SupabaseClient } from '@supabase/supabase-js'
|
|
|
|
const supabaseUrl = import.meta.env['VITE_SUPABASE_URL'] ?? ''
|
|
const supabaseAnonKey = import.meta.env['VITE_SUPABASE_ANON_KEY'] ?? ''
|
|
|
|
function createSupabaseClient(): SupabaseClient {
|
|
if (!supabaseUrl || !supabaseAnonKey) {
|
|
// Return a stub client for tests/dev without Supabase configured
|
|
return createClient('http://localhost:54321', 'stub-key')
|
|
}
|
|
return createClient(supabaseUrl, supabaseAnonKey)
|
|
}
|
|
|
|
export const supabase = createSupabaseClient()
|