Terminado sprint 2A

This commit is contained in:
markosbenitez
2026-06-02 10:27:52 -03:00
parent 418c91fb12
commit 0f376a8b75
81 changed files with 5379 additions and 46 deletions

17
lib/supabase.ts Normal file
View File

@@ -0,0 +1,17 @@
import { createClient as createSupabaseClient } from '@supabase/supabase-js'
// Browser-side client using the anon key (public, respects RLS)
// NEVER put SUPABASE_SERVICE_ROLE_KEY in a NEXT_PUBLIC_ variable or in this file.
export function createClient() {
const url = process.env.NEXT_PUBLIC_SUPABASE_URL
const anonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
if (!url || !anonKey) {
throw new Error(
'Missing NEXT_PUBLIC_SUPABASE_URL or NEXT_PUBLIC_SUPABASE_ANON_KEY. ' +
'Copy .env.example to .env.local and fill in the values from your Supabase project.'
)
}
return createSupabaseClient(url, anonKey)
}