Files
bsk/lib/supabase/client.js
T
tiennm99 b47d8fc3d1 refactor: convert TypeScript sources to JavaScript with JSDoc types
- app/, components/, lib/, i18n/, tests/, proxy renamed via git mv
- types carried into JSDoc: @template generics, @typedef aliases,
  /** @type */ casts where TS had as-casts or non-null assertions
- role tuple keeps its const assertion; the db-enum drift guard now
  checks the tuple values against the generated enum type
- use client/use server directives and server-only imports preserved
- prettier-formatted; vitest suite unchanged
2026-08-17 23:12:26 +07:00

14 lines
474 B
JavaScript

import { createBrowserClient } from "@supabase/ssr";
import { clientEnv, SUPABASE_SCHEMA } from "@/lib/env/client";
/** Browser Supabase client scoped to the bsk schema. Return type stays inferred so realtime/query generics flow to callers. */
export function createSupabaseBrowserClient() {
return createBrowserClient(
clientEnv.NEXT_PUBLIC_SUPABASE_URL,
clientEnv.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY,
{
db: { schema: SUPABASE_SCHEMA },
},
);
}