aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-15 22:19:19 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-15 22:19:19 +0800
commit2041e9945edf6f5255185de73c0dc332270e4bbb (patch)
tree2e8224bc00217b03887650116dc37f55440b4fdc /packages/website/ts/pages/documentation
parent126048bac9f52871b841d9898cabe7cfd265ebb6 (diff)
downloaddexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.gz
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.bz2
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.lz
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.xz
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.zst
dexon-sol-tools-2041e9945edf6f5255185de73c0dc332270e4bbb.zip
Fix website unused vars
Diffstat (limited to 'packages/website/ts/pages/documentation')
-rw-r--r--packages/website/ts/pages/documentation/comment.tsx2
-rw-r--r--packages/website/ts/pages/documentation/documentation.tsx8
-rw-r--r--packages/website/ts/pages/documentation/enum.tsx6
-rw-r--r--packages/website/ts/pages/documentation/event_definition.tsx3
-rw-r--r--packages/website/ts/pages/documentation/method_block.tsx4
-rw-r--r--packages/website/ts/pages/documentation/method_signature.tsx2
-rw-r--r--packages/website/ts/pages/documentation/source_link.tsx1
-rw-r--r--packages/website/ts/pages/documentation/type.tsx3
-rw-r--r--packages/website/ts/pages/documentation/type_definition.tsx2
9 files changed, 5 insertions, 26 deletions
diff --git a/packages/website/ts/pages/documentation/comment.tsx b/packages/website/ts/pages/documentation/comment.tsx
index 78bbdc069..9627fdcdc 100644
--- a/packages/website/ts/pages/documentation/comment.tsx
+++ b/packages/website/ts/pages/documentation/comment.tsx
@@ -22,3 +22,5 @@ export const Comment: React.SFC<CommentProps> = (props: CommentProps) => {
</div>
);
};
+
+Comment.defaultProps = defaultProps;
diff --git a/packages/website/ts/pages/documentation/documentation.tsx b/packages/website/ts/pages/documentation/documentation.tsx
index be99e77a2..0ca8ae9d3 100644
--- a/packages/website/ts/pages/documentation/documentation.tsx
+++ b/packages/website/ts/pages/documentation/documentation.tsx
@@ -17,35 +17,27 @@ import {MethodBlock} from 'ts/pages/documentation/method_block';
import {SourceLink} from 'ts/pages/documentation/source_link';
import {Type} from 'ts/pages/documentation/type';
import {TypeDefinition} from 'ts/pages/documentation/type_definition';
-import {AnchorTitle} from 'ts/pages/shared/anchor_title';
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
import {SectionHeader} from 'ts/pages/shared/section_header';
import {Dispatcher} from 'ts/redux/dispatcher';
import {
AddressByContractName,
- CustomType,
DocAgnosticFormat,
- Docs,
- DocsInfoConfig,
DoxityDocObj,
EtherscanLinkSuffixes,
Event,
- MenuSubsectionsBySection,
Networks,
Property,
SolidityMethod,
Styles,
TypeDefinitionByName,
- TypeDocNode,
TypescriptMethod,
- WebsitePaths,
} from 'ts/types';
import {constants} from 'ts/utils/constants';
import {docUtils} from 'ts/utils/doc_utils';
import {utils} from 'ts/utils/utils';
-const SCROLL_TO_TIMEOUT = 500;
const SCROLL_TOP_ID = 'docsScrollTop';
const CUSTOM_PURPLE = '#690596';
const CUSTOM_RED = '#e91751';
diff --git a/packages/website/ts/pages/documentation/enum.tsx b/packages/website/ts/pages/documentation/enum.tsx
index 8fcd2c252..b5fbc4bd2 100644
--- a/packages/website/ts/pages/documentation/enum.tsx
+++ b/packages/website/ts/pages/documentation/enum.tsx
@@ -1,9 +1,6 @@
import * as _ from 'lodash';
import * as React from 'react';
-import {EnumValue, TypeDocNode} from 'ts/types';
-import {utils} from 'ts/utils/utils';
-
-const STRING_ENUM_CODE_PREFIX = ' strEnum(';
+import {EnumValue} from 'ts/types';
interface EnumProps {
values: EnumValue[];
@@ -11,7 +8,6 @@ interface EnumProps {
export function Enum(props: EnumProps) {
const values = _.map(props.values, (value, i) => {
- const isLast = i === props.values.length - 1;
const defaultValueIfAny = !_.isUndefined(value.defaultValue) ? ` = ${value.defaultValue}` : '';
return `\n\t${value.name}${defaultValueIfAny},`;
});
diff --git a/packages/website/ts/pages/documentation/event_definition.tsx b/packages/website/ts/pages/documentation/event_definition.tsx
index 469e6bb37..3c57666e7 100644
--- a/packages/website/ts/pages/documentation/event_definition.tsx
+++ b/packages/website/ts/pages/documentation/event_definition.tsx
@@ -4,10 +4,7 @@ import {DocsInfo} from 'ts/pages/documentation/docs_info';
import {Type} from 'ts/pages/documentation/type';
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
import {Event, EventArg, HeaderSizes} from 'ts/types';
-import {constants} from 'ts/utils/constants';
-import {utils} from 'ts/utils/utils';
-const KEYWORD_COLOR = '#a81ca6';
const CUSTOM_GREEN = 'rgb(77, 162, 75)';
interface EventDefinitionProps {
diff --git a/packages/website/ts/pages/documentation/method_block.tsx b/packages/website/ts/pages/documentation/method_block.tsx
index 44e549211..9505f2aa4 100644
--- a/packages/website/ts/pages/documentation/method_block.tsx
+++ b/packages/website/ts/pages/documentation/method_block.tsx
@@ -1,8 +1,6 @@
import * as _ from 'lodash';
-import {Chip} from 'material-ui/Chip';
import {colors} from 'material-ui/styles';
import * as React from 'react';
-import * as ReactMarkdown from 'react-markdown';
import {Comment} from 'ts/pages/documentation/comment';
import {DocsInfo} from 'ts/pages/documentation/docs_info';
import {MethodSignature} from 'ts/pages/documentation/method_signature';
@@ -14,11 +12,9 @@ import {
SolidityMethod,
Styles,
TypeDefinitionByName,
- TypeDocNode,
TypescriptMethod,
} from 'ts/types';
import {typeDocUtils} from 'ts/utils/typedoc_utils';
-import {utils} from 'ts/utils/utils';
interface MethodBlockProps {
method: SolidityMethod|TypescriptMethod;
diff --git a/packages/website/ts/pages/documentation/method_signature.tsx b/packages/website/ts/pages/documentation/method_signature.tsx
index 846c9fa4f..df3b61814 100644
--- a/packages/website/ts/pages/documentation/method_signature.tsx
+++ b/packages/website/ts/pages/documentation/method_signature.tsx
@@ -42,6 +42,8 @@ export const MethodSignature: React.SFC<MethodSignatureProps> = (props: MethodSi
);
};
+MethodSignature.defaultProps = defaultProps;
+
function renderParameters(
method: TypescriptMethod|SolidityMethod, docsInfo: DocsInfo, typeDefinitionByName?: TypeDefinitionByName,
) {
diff --git a/packages/website/ts/pages/documentation/source_link.tsx b/packages/website/ts/pages/documentation/source_link.tsx
index 74fc6d4d5..9abf01706 100644
--- a/packages/website/ts/pages/documentation/source_link.tsx
+++ b/packages/website/ts/pages/documentation/source_link.tsx
@@ -2,7 +2,6 @@ import * as _ from 'lodash';
import {colors} from 'material-ui/styles';
import * as React from 'react';
import {Source} from 'ts/types';
-import {constants} from 'ts/utils/constants';
interface SourceLinkProps {
source: Source;
diff --git a/packages/website/ts/pages/documentation/type.tsx b/packages/website/ts/pages/documentation/type.tsx
index c564429d0..74b146d91 100644
--- a/packages/website/ts/pages/documentation/type.tsx
+++ b/packages/website/ts/pages/documentation/type.tsx
@@ -7,7 +7,6 @@ import {DocsInfo} from 'ts/pages/documentation/docs_info';
import {TypeDefinition} from 'ts/pages/documentation/type_definition';
import {Type as TypeDef, TypeDefinitionByName, TypeDocTypes} from 'ts/types';
import {constants} from 'ts/utils/constants';
-import {typeDocUtils} from 'ts/utils/typedoc_utils';
import {utils} from 'ts/utils/utils';
const BUILT_IN_TYPE_COLOR = '#e69d00';
@@ -48,10 +47,8 @@ interface TypeProps {
// <Type /> components (e.g when rendering the union type).
export function Type(props: TypeProps): any {
const type = props.type;
- const isIntrinsic = type.typeDocType === TypeDocTypes.Intrinsic;
const isReference = type.typeDocType === TypeDocTypes.Reference;
const isArray = type.typeDocType === TypeDocTypes.Array;
- const isStringLiteral = type.typeDocType === TypeDocTypes.StringLiteral;
let typeNameColor = 'inherit';
let typeName: string|React.ReactNode;
let typeArgs: React.ReactNode[] = [];
diff --git a/packages/website/ts/pages/documentation/type_definition.tsx b/packages/website/ts/pages/documentation/type_definition.tsx
index 17b182c70..edcf7bf47 100644
--- a/packages/website/ts/pages/documentation/type_definition.tsx
+++ b/packages/website/ts/pages/documentation/type_definition.tsx
@@ -9,8 +9,6 @@ import {MethodSignature} from 'ts/pages/documentation/method_signature';
import {Type} from 'ts/pages/documentation/type';
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
import {CustomType, CustomTypeChild, HeaderSizes, KindString, TypeDocTypes} from 'ts/types';
-import {constants} from 'ts/utils/constants';
-import {typeDocUtils} from 'ts/utils/typedoc_utils';
import {utils} from 'ts/utils/utils';
const KEYWORD_COLOR = '#a81ca6';