From e8c8d3e722676a250428795f70143ed3e5289cbc Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Tue, 25 Sep 2018 14:35:18 -0400 Subject: fix: rename SupportedDocJson field to SolDoc from Solidity https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219976199 https://github.com/0xProject/0x-monorepo/pull/1004 --- packages/react-docs/src/components/documentation.tsx | 2 +- packages/react-docs/src/types.ts | 2 +- packages/react-docs/src/utils/constants.ts | 2 +- packages/website/ts/containers/smart_contracts_documentation.ts | 2 +- packages/website/ts/pages/documentation/doc_page.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 0974297bc..3cd14923c 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -329,7 +329,7 @@ export class Documentation extends React.Component{externalExports}; } private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { - if (this.props.docsInfo.type !== SupportedDocJson.Solidity) { + if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) { return null; } diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index f475c2756..153448513 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -38,7 +38,7 @@ export enum KindString { } export enum SupportedDocJson { - Solidity = 'SOLIDITY', + SolDoc = 'SOL_DOC', TypeDoc = 'TYPEDOC', } diff --git a/packages/react-docs/src/utils/constants.ts b/packages/react-docs/src/utils/constants.ts index 35a939c51..b5b6cc00d 100644 --- a/packages/react-docs/src/utils/constants.ts +++ b/packages/react-docs/src/utils/constants.ts @@ -4,7 +4,7 @@ export const constants = { TYPES_SECTION_NAME: 'types', EXTERNAL_EXPORTS_SECTION_NAME: 'external exports', TYPE_TO_SYNTAX: { - [SupportedDocJson.Solidity]: 'solidity', + [SupportedDocJson.SolDoc]: 'solidity', [SupportedDocJson.TypeDoc]: 'typescript', } as { [supportedDocType: string]: string }, }; diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index 1f333beac..8d69afe71 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -17,7 +17,7 @@ const IntroMarkdownV2 = require('md/docs/smart_contracts/2.0.0/introduction'); const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SmartContracts, packageName: 'contracts', - type: SupportedDocJson.Solidity, + type: SupportedDocJson.SolDoc, displayName: '0x Smart Contracts', packageUrl: 'https://github.com/0xProject/contracts', markdownMenu: { diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 7bf3addc0..a06d29035 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -141,7 +141,7 @@ export class DocPage extends React.Component { versionDocObj as GeneratedDocJson, this.props.docsInfo, ).convertToDocAgnosticFormat(); - } else if (this.props.docsInfo.type === SupportedDocJson.Solidity) { + } else if (this.props.docsInfo.type === SupportedDocJson.SolDoc) { // documenting solidity. docAgnosticFormat = versionDocObj as DocAgnosticFormat; // need to modify docsInfo like convertToDocAgnosticFormat() would do -- cgit