Skip to content

Commit

Permalink
Add version envs
Browse files Browse the repository at this point in the history
  • Loading branch information
donguks committed Nov 5, 2020
1 parent 8db38e9 commit eb41ccc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/more/Setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import LocaleType from '../../enums/LocaleType';
import RootContext from '../../contexts/RootContext';
import { SubmitButton } from '../../shared/components/SubmitButton';
import registerForPushNotificationsAsync from '../../utiles/registerForPushNotificationsAsync';
import getEnvironment from '../../utiles/getEnvironment';

interface Props {
resetHandler: () => void;
Expand Down Expand Up @@ -158,7 +159,7 @@ const Setting: FunctionComponent<Props> = (props: Props) => {
}}
/>
<P1Text
label={i18n.t('more_label.version') + ' 1.1.0'}
label={i18n.t('more_label.version') + ` ${getEnvironment().version}`}
style={{
marginTop: 30,
paddingLeft: '5%',
Expand Down
4 changes: 4 additions & 0 deletions src/utiles/getEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type Environment = {
envName: 'DEVELOPMENT' | 'STAGING' | 'PRODUCTION';
apiUrl: string;
dappUrl: string;
version: string;
}

function getEnvironment(): Environment {
Expand All @@ -15,6 +16,7 @@ function getEnvironment(): Environment {
envName: "PRODUCTION",
apiUrl: "https://api.elysia.land",
dappUrl: "dapp.elysia.land",
version: "1.1.0",
};
}

Expand All @@ -23,6 +25,7 @@ function getEnvironment(): Environment {
envName: "STAGING",
apiUrl: "https://staging-api.elysia.land",
dappUrl: "staging-dapp.elysia.land",
version: "1.1.0",
};
}

Expand All @@ -31,6 +34,7 @@ function getEnvironment(): Environment {
apiUrl: `http://${(manifest.debuggerHost || 'localhost').split(':').shift()}:3000`,
// dappUrl: "localhost:5000",
dappUrl: "staging-dapp.elysia.land",
version: "1.1.0",
};
}

Expand Down

0 comments on commit eb41ccc

Please sign in to comment.