diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-11 17:04:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-11 17:04:02 +0800 |
commit | 6d1a587c5c5666a54c29302db90dd4d9fc79059e (patch) | |
tree | 08db658038ef6de4d73beb0a51de93a8641887f7 /packages/website/ts/pages | |
parent | bce97c2543d8f1f4fef3e65086d25ed37977b361 (diff) | |
download | dexon-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/pages')
-rw-r--r-- | packages/website/ts/pages/documentation/doc_page.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 8ec1a023d..aca20447b 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -8,14 +8,14 @@ import semverSort = require('semver-sort'); import { SidebarHeader } from 'ts/components/sidebar_header'; import { TopBar } from 'ts/components/top_bar/top_bar'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { DocPackages, Environments } from 'ts/types'; +import { DocPackages } from 'ts/types'; import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { docUtils } from 'ts/utils/doc_utils'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; -const isDevelopment = configs.ENVIRONMENT === Environments.DEVELOPMENT; +const isDevelopmentOrStaging = utils.isDevelopment() || utils.isStaging(); const DEFAULT_ICON = 'docs.png'; const ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH = '0.32.4'; @@ -106,7 +106,9 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> { } private async _fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists?: string): Promise<void> { const folderName = docIdToSubpackageName[this.props.docsInfo.id]; - const docBucketRoot = isDevelopment ? constants.S3_STAGING_DOC_BUCKET_ROOT : constants.S3_DOC_BUCKET_ROOT; + const docBucketRoot = isDevelopmentOrStaging + ? constants.S3_STAGING_DOC_BUCKET_ROOT + : constants.S3_DOC_BUCKET_ROOT; const versionToFilePath = await docUtils.getVersionToFilePathAsync(docBucketRoot, folderName); const versions = _.keys(versionToFilePath); this.props.dispatcher.updateAvailableDocVersions(versions); |