mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
* refactor: refactor support form Refactor support form to make it easier to maintain: - Split up large components into smaller components and hooks - Lift state up so we don't have to do complex child/parent state-syncing via useEffect - Use nuqs parsing for consistent serialization/deserialization of support form prefilled fields * test: support form Add comprehensive tests for support form * fix(support form): project and org empty state * Nit clean up * More clean up * cleannnn * fix(support form): allow case-insensitive category in url * clean(support form tests): remove unused param * fix(support form): incorrect logic for sending affected services in payload * clean(support form): use NO_ORG_MARKER and NO_PROJECT_MARKER instead of strings * fix(support form): don't show upgrade cta if already on enterprise --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
22 lines
687 B
TypeScript
22 lines
687 B
TypeScript
import { createClient, type SupabaseClient } from '@supabase/supabase-js'
|
|
|
|
export const createSupportStorageClient = (): SupabaseClient => {
|
|
const SUPPORT_API_URL = process.env.NEXT_PUBLIC_SUPPORT_API_URL || ''
|
|
const SUPPORT_API_KEY = process.env.NEXT_PUBLIC_SUPPORT_ANON_KEY || ''
|
|
|
|
return createClient(SUPPORT_API_URL, SUPPORT_API_KEY, {
|
|
auth: {
|
|
persistSession: false,
|
|
autoRefreshToken: false,
|
|
// @ts-expect-error
|
|
multiTab: false,
|
|
detectSessionInUrl: false,
|
|
localStorage: {
|
|
getItem: (_key: string) => undefined,
|
|
setItem: (_key: string, _value: string) => {},
|
|
removeItem: (_key: string) => {},
|
|
},
|
|
},
|
|
})
|
|
}
|