-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenvironment.js
29 lines (25 loc) · 1.17 KB
/
environment.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as Updates from 'expo-updates'
import { useContext } from 'react'
import ConfigurationContext from './src/context/configuration'
const getEnvVars = (env = Updates.releaseChannel) => {
const configuration = useContext(ConfigurationContext)
console.log('configuration', configuration)
if (env === 'production' || env === 'staging') {
return {
GRAPHQL_URL: 'https://enatega-multivendor.up.railway.app/graphql',
WS_GRAPHQL_URL: 'wss://enatega-multivendor.up.railway.app/graphql',
SENTRY_DSN: configuration.riderAppSentryUrl,
GOOGLE_MAPS_KEY: configuration.googleApiKey
}
}
return {
GRAPHQL_URL: 'https://enatega-multivendor.up.railway.app/graphql',
WS_GRAPHQL_URL: 'wss://enatega-multivendor.up.railway.app/graphql',
SENTRY_DSN: configuration.riderAppSentryUrl,
GOOGLE_MAPS_KEY: configuration.googleApiKey
// SENTRY_DSN:
// 'https://[email protected]/6135261', // [Add your own Sentry DSN link][example: https://[email protected]/5135261]
// GOOGLE_MAPS_KEY: 'AIzaSyCzNP5qQql2a5y8lOoO-1yj1lj_tzjVImA'
}
}
export default getEnvVars