aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages
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
parent126048bac9f52871b841d9898cabe7cfd265ebb6 (diff)
downloaddexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.gz
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.bz2
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.lz
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.xz
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.tar.zst
dexon-0x-contracts-2041e9945edf6f5255185de73c0dc332270e4bbb.zip
Fix website unused vars
Diffstat (limited to 'packages/website/ts/pages')
-rw-r--r--packages/website/ts/pages/about/about.tsx6
-rw-r--r--packages/website/ts/pages/about/profile.tsx3
-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
-rw-r--r--packages/website/ts/pages/faq/faq.tsx2
-rw-r--r--packages/website/ts/pages/landing/landing.tsx26
-rw-r--r--packages/website/ts/pages/not_found.tsx1
-rw-r--r--packages/website/ts/pages/shared/nested_sidebar_menu.tsx3
-rw-r--r--packages/website/ts/pages/shared/version_drop_down.tsx2
16 files changed, 9 insertions, 65 deletions
diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx
index 3af05e8a4..011bbb9d9 100644
--- a/packages/website/ts/pages/about/about.tsx
+++ b/packages/website/ts/pages/about/about.tsx
@@ -1,15 +1,11 @@
import * as _ from 'lodash';
-import RaisedButton from 'material-ui/RaisedButton';
import {colors} from 'material-ui/styles';
import * as React from 'react';
import * as DocumentTitle from 'react-document-title';
-import {Link} from 'react-router-dom';
import {Footer} from 'ts/components/footer';
import {TopBar} from 'ts/components/top_bar';
import {Profile} from 'ts/pages/about/profile';
-import {Question} from 'ts/pages/faq/question';
import {ProfileInfo, Styles} from 'ts/types';
-import {configs} from 'ts/utils/configs';
import {constants} from 'ts/utils/constants';
import {utils} from 'ts/utils/utils';
@@ -236,7 +232,7 @@ export class About extends React.Component<AboutProps, AboutState> {
}
private renderProfiles(profiles: ProfileInfo[]) {
const numIndiv = profiles.length;
- const colSize = utils.getColSize(profiles.length);
+ const colSize = utils.getColSize(numIndiv);
return _.map(profiles, profile => {
return (
<div
diff --git a/packages/website/ts/pages/about/profile.tsx b/packages/website/ts/pages/about/profile.tsx
index 71dbd09b5..86aa788b2 100644
--- a/packages/website/ts/pages/about/profile.tsx
+++ b/packages/website/ts/pages/about/profile.tsx
@@ -1,9 +1,6 @@
import * as _ from 'lodash';
-import {colors} from 'material-ui/styles';
import * as React from 'react';
-import {Element as ScrollElement} from 'react-scroll';
import {ProfileInfo, Styles} from 'ts/types';
-import {utils} from 'ts/utils/utils';
const IMAGE_DIMENSION = 149;
const styles: Styles = {
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';
diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx
index c53ed28b8..b3fe21da7 100644
--- a/packages/website/ts/pages/faq/faq.tsx
+++ b/packages/website/ts/pages/faq/faq.tsx
@@ -1,9 +1,7 @@
import * as _ from 'lodash';
-import RaisedButton from 'material-ui/RaisedButton';
import {colors} from 'material-ui/styles';
import * as React from 'react';
import * as DocumentTitle from 'react-document-title';
-import {Link} from 'react-router-dom';
import {Footer} from 'ts/components/footer';
import {TopBar} from 'ts/components/top_bar';
import {Question} from 'ts/pages/faq/question';
diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx
index f3c46b8c7..7992c7a6c 100644
--- a/packages/website/ts/pages/landing/landing.tsx
+++ b/packages/website/ts/pages/landing/landing.tsx
@@ -6,8 +6,7 @@ import DocumentTitle = require('react-document-title');
import {Link} from 'react-router-dom';
import {Footer} from 'ts/components/footer';
import {TopBar} from 'ts/components/top_bar';
-import {ScreenWidths, Styles, WebsitePaths} from 'ts/types';
-import {configs} from 'ts/utils/configs';
+import {ScreenWidths, WebsitePaths} from 'ts/types';
import {constants} from 'ts/utils/constants';
import {utils} from 'ts/utils/utils';
@@ -269,7 +268,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
const isSmallScreen = this.state.screenWidth === ScreenWidths.SM;
const isMediumScreen = this.state.screenWidth === ScreenWidths.MD;
const projectList = _.map(projects, (project: Project, i: number) => {
- const colWidth = isSmallScreen ? 3 : isMediumScreen ? 4 : 2 - (i % 2);
+ const colWidth = isSmallScreen ? 3 : (isMediumScreen ? 4 : 2 - (i % 2));
return (
<div
key={`project-${project.logoFileName}`}
@@ -470,11 +469,6 @@ export class Landing extends React.Component<LandingProps, LandingState> {
}
private renderBuildingBlocksSection() {
const isSmallScreen = this.state.screenWidth === ScreenWidths.SM;
- const underlineStyle: React.CSSProperties = {
- height: isSmallScreen ? 18 : 23,
- lineHeight: 'none',
- borderBottom: '2px solid #979797',
- };
const descriptionStyle: React.CSSProperties = {
fontFamily: 'Roboto Mono',
lineHeight: isSmallScreen ? 1.5 : 2,
@@ -606,21 +600,6 @@ export class Landing extends React.Component<LandingProps, LandingState> {
});
return assets;
}
- private renderLink(label: string, path: string, color: string, style?: React.CSSProperties) {
- return (
- <div
- style={{borderBottom: `1px solid ${color}`, paddingBottom: 1, height: 20, lineHeight: 1.7, ...style}}
- >
- <Link
- to={path}
- className="text-decoration-none"
- style={{color, fontFamily: 'Roboto Mono'}}
- >
- {label}
- </Link>
- </div>
- );
- }
private renderInfoBoxes() {
const isSmallScreen = this.state.screenWidth === ScreenWidths.SM;
const boxStyle: React.CSSProperties = {
@@ -676,7 +655,6 @@ export class Landing extends React.Component<LandingProps, LandingState> {
}
private renderUseCases() {
const isSmallScreen = this.state.screenWidth === ScreenWidths.SM;
- const isMediumScreen = this.state.screenWidth === ScreenWidths.MD;
const useCases: UseCase[] = [
{
diff --git a/packages/website/ts/pages/not_found.tsx b/packages/website/ts/pages/not_found.tsx
index 075bcf91e..df505792d 100644
--- a/packages/website/ts/pages/not_found.tsx
+++ b/packages/website/ts/pages/not_found.tsx
@@ -1,6 +1,5 @@
import * as _ from 'lodash';
import * as React from 'react';
-import {Link} from 'react-router-dom';
import {Footer} from 'ts/components/footer';
import {TopBar} from 'ts/components/top_bar';
import {Styles} from 'ts/types';
diff --git a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
index cbb863f3e..15ec44399 100644
--- a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
+++ b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
@@ -4,9 +4,8 @@ import {colors} from 'material-ui/styles';
import * as React from 'react';
import {Link as ScrollLink} from 'react-scroll';
import {VersionDropDown} from 'ts/pages/shared/version_drop_down';
-import {Docs, MenuSubsectionsBySection, Styles} from 'ts/types';
+import {MenuSubsectionsBySection, Styles} from 'ts/types';
import {constants} from 'ts/utils/constants';
-import {typeDocUtils} from 'ts/utils/typedoc_utils';
import {utils} from 'ts/utils/utils';
interface NestedSidebarMenuProps {
diff --git a/packages/website/ts/pages/shared/version_drop_down.tsx b/packages/website/ts/pages/shared/version_drop_down.tsx
index 4af9a834f..e63ad19cd 100644
--- a/packages/website/ts/pages/shared/version_drop_down.tsx
+++ b/packages/website/ts/pages/shared/version_drop_down.tsx
@@ -2,8 +2,6 @@ import * as _ from 'lodash';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
-import {Docs} from 'ts/types';
-import {constants} from 'ts/utils/constants';
interface VersionDropDownProps {
selectedVersion: string;