Create types sectionName constant

This commit is contained in:
Fabio Berger
2017-12-21 17:28:20 +01:00
parent 3e91773cd9
commit d725de7286
4 changed files with 7 additions and 3 deletions

View File

@@ -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,
);