Skip to content

Commit

Permalink
fix auth
Browse files Browse the repository at this point in the history
  • Loading branch information
truskovskiyk committed Dec 20, 2024
1 parent c480d1f commit b3c2d3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions no-ocr-ui/src/lib/supabase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createClient } from '@supabase/supabase-js';

// Provide default values for development to prevent initialization errors
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL || 'http://localhost:54321';
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY || 'placeholder-key';

export const supabase = createClient(supabaseUrl, supabaseAnonKey);
2 changes: 1 addition & 1 deletion no-ocr-ui/src/stores/authStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { create } from 'zustand';
import { AuthState } from '../types/auth';
import { supabase } from '../config/supabase';
import { supabase } from '../lib/supabase';

export const useAuthStore = create<AuthState>((set) => ({
user: null,
Expand Down

0 comments on commit b3c2d3f

Please sign in to comment.