mirror of
https://github.com/tiennm99/bsk.git
synced 2026-08-23 10:25:22 +00:00
- 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
14 lines
474 B
JavaScript
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 },
|
|
},
|
|
);
|
|
}
|