Replace use of react-native-config with process.env

This commit is contained in:
ponas committed 2023-08-04 03:34:29 +02:00
1 parent 7a920343f7
commit 1d85333c83
5 files changed
+13 -18

No files matched your search

+1 -2
View File
@@ -1,5 +1,4 @@
import { useEffect, useState } from 'react';
import Config from 'react-native-config';
import moment from 'moment';
import 'moment/locale/nb';
@@ -56,7 +55,7 @@ const useEventList = () => {
};
const fetchEvents = async () => {
const url = `${Config.EVENT_API_URL}/wp-json/wp/v2/events?page=${page}&future=1`;
const url = `${process.env.EXPO_PUBLIC_EVENT_API_URL}/wp-json/wp/v2/events?page=${page}&future=1`;
setLoading(true);
let eventData;
+1 -2
View File
@@ -1,7 +1,6 @@
import React from 'react';
import { Linking, StyleSheet, View } from 'react-native';
import { ScrollView, Spinner, Button, Text } from 'native-base';
import Config from 'react-native-config';
import theme from '../../theme';
import useLogin from './useLogin';
@@ -44,7 +43,7 @@ const Login = () => {
small
light
onPress={() => {
Linking.openURL(Config.DUSKEN_FORGOT_PASSWORD_URL);
Linking.openURL(process.env.EXPO_PUBLIC_DUSKEN_FORGOT_PASSWORD_URL);
}}
style={styles.forgotPasswordButton}
>