diff --git a/babel.config.js b/babel.config.js index f808ad85..66b82f92 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,17 +2,21 @@ module.exports = api => { api.cache(true); return { presets: ['babel-preset-expo'], - plugins: ['expo-router/babel', - ["module:react-native-dotenv", { - "envName": "APP_ENV", - "moduleName": "@env", - "path": ".env", - "blocklist": null, - "allowlist": null, - "safe": false, - "allowUndefined": true, - "verbose": false - }] + plugins: [ + 'expo-router/babel', + [ + 'module:react-native-dotenv', + { + envName: 'APP_ENV', + moduleName: '@env', + path: '.env', + blocklist: null, + allowlist: null, + safe: false, + allowUndefined: true, + verbose: false, + }, + ], ], }; }; diff --git a/lib/DummyQueries.tsx b/lib/DummyQueries.tsx index 0cc8a8e2..599b9d03 100644 --- a/lib/DummyQueries.tsx +++ b/lib/DummyQueries.tsx @@ -1,3 +1,4 @@ +import { View } from 'react-native'; import { Button, Text } from 'react-native-elements'; import supabase from './supabase'; @@ -41,12 +42,12 @@ export default function DummyQueries() { } return ( -
+
- ) + {queryHolder ? '' : queryHolder} + + ); } diff --git a/lib/supabase.ts b/lib/supabase.ts index 9b085ff5..877ccbad 100644 --- a/lib/supabase.ts +++ b/lib/supabase.ts @@ -1,10 +1,12 @@ -import { SUPABASE_ANON_KEY, SUPABASE_URL } from "@env"; import { createClient } from '@supabase/supabase-js'; import 'react-native-url-polyfill/auto'; -if (!SUPABASE_URL || !SUPABASE_ANON_KEY) { +if (!process.env.SUPABASE_URL || !process.env.SUPABASE_ANON_KEY) { throw new Error('Supabase environment variables are not defined.'); } -const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); +const supabase = createClient( + process.env.SUPABASE_URL, + process.env.SUPABASE_ANON_KEY, +); export default supabase;