Skip to content

Commit

Permalink
πŸ› fix: Update server - v.0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mpcgt committed Oct 7, 2024
1 parent 9ac02d8 commit c4e9032
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ dist-ssr
.env
src/utils/db.firebase.tsx
src/components/features/login/login.tsx
src/api/supabase.tsx
15 changes: 15 additions & 0 deletions src/api/supabase.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { createClient } from "@supabase/supabase-js";

function isString(value: string | undefined): value is string {
return typeof value === 'string';
}

const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;


if (!isString(supabaseUrl) || !isString(supabaseAnonKey)) {
throw new Error('Supabase URL or Anon Key is missing or invalid');
}

export const supabase = createClient(supabaseUrl, supabaseAnonKey);

0 comments on commit c4e9032

Please sign in to comment.