| import { createBrowserClient } from "@supabase/ssr"; | |
| let cached: ReturnType<typeof createBrowserClient> | null = null; | |
| export function getSupabaseBrowser() { | |
| if (cached) return cached; | |
| const url = process.env.NEXT_PUBLIC_SUPABASE_URL!; | |
| const anonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!; | |
| cached = createBrowserClient(url, anonKey); | |
| return cached; | |
| } | |