aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-11 17:04:02 +0800
committerFabio Berger <me@fabioberger.com>2018-04-11 17:04:02 +0800
commit6d1a587c5c5666a54c29302db90dd4d9fc79059e (patch)
tree08db658038ef6de4d73beb0a51de93a8641887f7 /packages/website/ts/utils/utils.ts
parentbce97c2543d8f1f4fef3e65086d25ed37977b361 (diff)
downloaddexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar.gz
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar.bz2
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar.lz
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar.xz
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.tar.zst
dexon-sol-tools-6d1a587c5c5666a54c29302db90dd4d9fc79059e.zip
Show staging docs on development and staging
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r--packages/website/ts/utils/utils.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index afe159beb..53d60b3ce 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -5,7 +5,7 @@ import { BigNumber } from '@0xproject/utils';
import deepEqual = require('deep-equal');
import * as _ from 'lodash';
import * as moment from 'moment';
-import { Order, Providers, ScreenWidths, Side, SideToAssetToken, Token, TokenByAddress } from 'ts/types';
+import { Environments, Order, Providers, ScreenWidths, Side, SideToAssetToken, Token, TokenByAddress } from 'ts/types';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
import * as u2f from 'ts/vendor/u2f_api';
@@ -292,4 +292,10 @@ export const utils = {
}
return parsedProviderName;
},
+ isDevelopment() {
+ return configs.ENVIRONMENT === Environments.DEVELOPMENT;
+ },
+ isStaging() {
+ return _.includes(window.location.href, configs.DOMAIN_STAGING);
+ },
};