From d725de72861c6a6218c7f4822a339175a2da7403 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 21 Dec 2017 17:28:20 +0100 Subject: Create types sectionName constant --- packages/website/ts/containers/connect_documentation.tsx | 3 ++- packages/website/ts/containers/zero_ex_js_documentation.tsx | 3 ++- packages/website/ts/pages/documentation/method_signature.tsx | 3 ++- packages/website/ts/utils/constants.ts | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'packages') 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 = (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', -- cgit v1.2.3