Additions Channel Testing
This commit is contained in:
2
app.json
2
app.json
@@ -8,7 +8,7 @@
|
|||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true,
|
"supportsTablet": true,
|
||||||
"bundleIdentifier": "com.imex.imexmobile",
|
"bundleIdentifier": "com.imex.imexmobile",
|
||||||
"buildNumber": "1.0.12-1",
|
"buildNumber": "1.0.12.1",
|
||||||
"googleServicesFile": "./GoogleService-Info.plist"
|
"googleServicesFile": "./GoogleService-Info.plist"
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Constants from "expo-constants";
|
import Constants from "expo-constants";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
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 { Title } from "react-native-paper";
|
||||||
import { purgeStoredState } from "redux-persist";
|
import { purgeStoredState } from "redux-persist";
|
||||||
import SignOutButton from "../sign-out-button/sign-out-button.component";
|
import SignOutButton from "../sign-out-button/sign-out-button.component";
|
||||||
@@ -24,6 +24,7 @@ export default function ScreenSettingsComponent() {
|
|||||||
</Title>
|
</Title>
|
||||||
<SignOutButton />
|
<SignOutButton />
|
||||||
<Button title="Purge State" onPress={() => purgeStoredState()} />
|
<Button title="Purge State" onPress={() => purgeStoredState()} />
|
||||||
|
<Text>Test Channel</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
12
env.js
12
env.js
@@ -1,5 +1,7 @@
|
|||||||
|
import * as Updates from "expo-updates";
|
||||||
|
|
||||||
const ENV = {
|
const ENV = {
|
||||||
dev: {
|
test: {
|
||||||
API_URL: "https://api.test.imex.online",
|
API_URL: "https://api.test.imex.online",
|
||||||
uri: "https://db.test.bodyshop.app/v1/graphql",
|
uri: "https://db.test.bodyshop.app/v1/graphql",
|
||||||
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
|
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
|
||||||
@@ -42,10 +44,10 @@ const ENV = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getEnvVars() {
|
function getEnvVars() {
|
||||||
let env = process.env.NODE_ENV;
|
let env = Updates.releaseChannel;
|
||||||
if (env === null || env === undefined || env === "") return ENV.dev;
|
if (env === null || env === undefined || env === "") return ENV.test;
|
||||||
if (env.indexOf("dev") !== -1) return ENV.dev;
|
if (env.indexOf("test") !== -1) return ENV.test;
|
||||||
if (env.indexOf("prod") !== -1) return ENV.prod;
|
if (env.indexOf("default") !== -1) return ENV.prod;
|
||||||
else return ENV.prod;
|
else return ENV.prod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user