Additions Channel Testing

This commit is contained in:
Patrick Fic
2021-05-20 16:53:00 -07:00
parent 130dac3921
commit f4b045bc33
3 changed files with 10 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.imex.imexmobile",
"buildNumber": "1.0.12-1",
"buildNumber": "1.0.12.1",
"googleServicesFile": "./GoogleService-Info.plist"
},
"android": {

View File

@@ -1,7 +1,7 @@
import Constants from "expo-constants";
import React from "react";
import { useTranslation } from "react-i18next";
import { Button, View } from "react-native";
import { Button, View, Text } from "react-native";
import { Title } from "react-native-paper";
import { purgeStoredState } from "redux-persist";
import SignOutButton from "../sign-out-button/sign-out-button.component";
@@ -24,6 +24,7 @@ export default function ScreenSettingsComponent() {
</Title>
<SignOutButton />
<Button title="Purge State" onPress={() => purgeStoredState()} />
<Text>Test Channel</Text>
</View>
);
}

12
env.js
View File

@@ -1,5 +1,7 @@
import * as Updates from "expo-updates";
const ENV = {
dev: {
test: {
API_URL: "https://api.test.imex.online",
uri: "https://db.test.bodyshop.app/v1/graphql",
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
@@ -42,10 +44,10 @@ const ENV = {
};
function getEnvVars() {
let env = process.env.NODE_ENV;
if (env === null || env === undefined || env === "") return ENV.dev;
if (env.indexOf("dev") !== -1) return ENV.dev;
if (env.indexOf("prod") !== -1) return ENV.prod;
let env = Updates.releaseChannel;
if (env === null || env === undefined || env === "") return ENV.test;
if (env.indexOf("test") !== -1) return ENV.test;
if (env.indexOf("default") !== -1) return ENV.prod;
else return ENV.prod;
}