-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
27 lines (25 loc) · 1.03 KB
/
app.config.ts
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
import { ConfigContext, ExpoConfig } from 'expo/config';
const Config = {
sura: 'https://quranenc.com/api/v1/translation/sura/english_rwwad',
aya: 'https://quranenc.com/api/v1/translation/aya/english_rwwad',
audioayah: 'https://everyayah.com/data/AbdulSamad_64kbps_QuranExplorer.Com',
};
if (process.env.NODE_ENV === 'main') {
Config.sura = 'https://quranenc.com/api/v1/translation/sura/english_rwwad';
Config.aya = 'https://quranenc.com/api/v1/translation/aya/english_rwwad';
Config.audioayah = 'https://everyayah.com/data/AbdulSamad_64kbps_QuranExplorer.Com';
} else if (process.env.NODE_ENV === 'staging') {
Config.sura = 'https://quranenc.com/api/v1/translation/sura/english_rwwad';
Config.aya = 'https://quranenc.com/api/v1/translation/aya/english_rwwad';
Config.audioayah = 'https://everyayah.com/data/AbdulSamad_64kbps_QuranExplorer.Com';
}
export default ({ config }: ConfigContext): ExpoConfig => {
const { extra } = config;
return {
...config,
extra: {
...extra,
...Config,
},
} as ExpoConfig;
};