First commit

This commit is contained in:
mdares
2026-02-07 18:08:42 -06:00
commit b7a86a2d1c
57 changed files with 9188 additions and 0 deletions

18
lib/supabase/browser.ts Normal file
View File

@@ -0,0 +1,18 @@
import { createClient, type SupabaseClient } from "@supabase/supabase-js";
let browserClient: SupabaseClient | null = null;
export const supabaseBrowser = (): SupabaseClient | null => {
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
const anonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
if (!url || !anonKey) {
return null;
}
if (!browserClient) {
browserClient = createClient(url, anonKey);
}
return browserClient;
};