import { createClient } from '@chat-app/shared/supabase';

import { env } from './env';
import { localStorageAdapter } from './storage';

export const supabase = createClient({
  url: env.supabaseUrl,
  anonKey: env.supabaseAnonKey,
  sessionStorage: localStorageAdapter,
  // We manually parse the callback URL in App.tsx because Tauri webview
  // loads a fresh route rather than appending hash params to the current one.
  detectSessionInUrl: false,
});
