diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-22 00:28:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-22 00:28:20 +0800 |
commit | d725de72861c6a6218c7f4822a339175a2da7403 (patch) | |
tree | 0c5312137148fb90682dec381203ae25da08a59d | |
parent | 3e91773cd94162fca1855638a76d7bd2f510558a (diff) | |
download | dexon-0x-contracts-d725de72861c6a6218c7f4822a339175a2da7403.tar.gz dexon-0x-contracts-d725de72861c6a6218c7f4822a339175a2da7403.tar.zst dexon-0x-contracts-d725de72861c6a6218c7f4822a339175a2da7403.zip |
Create types sectionName constant
4 files changed, 7 insertions, 3 deletions
diff --git a/packages/website/ts/containers/connect_documentation.tsx b/packages/website/ts/containers/connect_documentation.tsx index 3b181a814..5e0a59e2d 100644 --- a/packages/website/ts/containers/connect_documentation.tsx +++ b/packages/website/ts/containers/connect_documentation.tsx @@ -10,6 +10,7 @@ import { import {Dispatcher} from 'ts/redux/dispatcher'; import {State} from 'ts/redux/reducer'; import {DocsInfoConfig, WebsitePaths} from 'ts/types'; +import {constants} from 'ts/utils/constants'; import {typeDocUtils} from 'ts/utils/typedoc_utils'; /* tslint:disable:no-var-requires */ @@ -22,7 +23,7 @@ const connectDocSections = { installation: 'installation', httpClient: 'httpClient', webSocketOrderbookChannel: 'webSocketOrderbookChannel', - types: 'types', + types: constants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { diff --git a/packages/website/ts/containers/zero_ex_js_documentation.tsx b/packages/website/ts/containers/zero_ex_js_documentation.tsx index 2f2c49167..8e40a3fbc 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.tsx +++ b/packages/website/ts/containers/zero_ex_js_documentation.tsx @@ -10,6 +10,7 @@ import { import {Dispatcher} from 'ts/redux/dispatcher'; import {State} from 'ts/redux/reducer'; import {DocsInfoConfig, WebsitePaths} from 'ts/types'; +import {constants} from 'ts/utils/constants'; import {typeDocUtils} from 'ts/utils/typedoc_utils'; /* tslint:disable:no-var-requires */ @@ -34,7 +35,7 @@ const zeroExJsDocSections = { etherToken: 'etherToken', proxy: 'proxy', orderWatcher: 'orderWatcher', - types: 'types', + types: constants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { diff --git a/packages/website/ts/pages/documentation/method_signature.tsx b/packages/website/ts/pages/documentation/method_signature.tsx index 14b91ab5d..366d4c13e 100644 --- a/packages/website/ts/pages/documentation/method_signature.tsx +++ b/packages/website/ts/pages/documentation/method_signature.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import {DocsInfo} from 'ts/pages/documentation/docs_info'; import {Type} from 'ts/pages/documentation/type'; import {Parameter, SolidityMethod, TypeDefinitionByName, TypescriptMethod} from 'ts/types'; +import {constants} from 'ts/utils/constants'; interface MethodSignatureProps { method: TypescriptMethod|SolidityMethod; @@ -19,7 +20,7 @@ const defaultProps = { }; export const MethodSignature: React.SFC<MethodSignatureProps> = (props: MethodSignatureProps) => { - const sectionName = 'types'; + const sectionName = constants.TYPES_SECTION_NAME; const parameters = renderParameters( props.method, props.docsInfo, sectionName, props.typeDefinitionByName, ); diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index 761d00ef7..facaf5dd6 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -46,6 +46,7 @@ export const constants = { UNAVAILABLE_STATUS: 503, TAKER_FEE: new BigNumber(0), TESTNET_NAME: 'Kovan', + TYPES_SECTION_NAME: 'types', PROJECT_URL_ETHFINEX: 'https://www.bitfinex.com/ethfinex', PROJECT_URL_RADAR_RELAY: 'https://radarrelay.com', PROJECT_URL_PARADEX: 'https://paradex.io', |