aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-22 22:05:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-03 18:37:38 +0800
commite744e4cd989bd3ae1070c59f7baa8097f18b8b06 (patch)
treea7fde03873f3c1b8689d3991edbb362f8022e5f0 /packages/website/ts/containers
parent9a96e8c704b6f84e00bbe848159a4819844cf09d (diff)
downloaddexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.gz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.bz2
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.lz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.xz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.zst
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.zip
Apply prettier config
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r--packages/website/ts/containers/connect_documentation.tsx51
-rw-r--r--packages/website/ts/containers/generate_order_form.tsx15
-rw-r--r--packages/website/ts/containers/portal.tsx43
-rw-r--r--packages/website/ts/containers/smart_contracts_documentation.tsx42
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.tsx52
5 files changed, 76 insertions, 127 deletions
diff --git a/packages/website/ts/containers/connect_documentation.tsx b/packages/website/ts/containers/connect_documentation.tsx
index 5e0a59e2d..3e02a7d05 100644
--- a/packages/website/ts/containers/connect_documentation.tsx
+++ b/packages/website/ts/containers/connect_documentation.tsx
@@ -1,17 +1,14 @@
import * as _ from 'lodash';
import * as React from 'react';
-import {connect} from 'react-redux';
-import {Dispatch} from 'redux';
-import {DocsInfo} from 'ts/pages/documentation/docs_info';
-import {
- Documentation as DocumentationComponent,
- DocumentationAllProps,
-} from 'ts/pages/documentation/documentation';
-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';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocsInfo } from 'ts/pages/documentation/docs_info';
+import { Documentation as DocumentationComponent, DocumentationAllProps } from 'ts/pages/documentation/documentation';
+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 */
const IntroMarkdown = require('md/docs/connect/introduction');
@@ -33,21 +30,11 @@ const docsInfoConfig: DocsInfoConfig = {
websitePath: WebsitePaths.Connect,
docsJsonRoot: 'https://s3.amazonaws.com/connect-docs-jsons',
menu: {
- introduction: [
- connectDocSections.introduction,
- ],
- install: [
- connectDocSections.installation,
- ],
- httpClient: [
- connectDocSections.httpClient,
- ],
- webSocketOrderbookChannel: [
- connectDocSections.webSocketOrderbookChannel,
- ],
- types: [
- connectDocSections.types,
- ],
+ introduction: [connectDocSections.introduction],
+ install: [connectDocSections.installation],
+ httpClient: [connectDocSections.httpClient],
+ webSocketOrderbookChannel: [connectDocSections.webSocketOrderbookChannel],
+ types: [connectDocSections.types],
},
sectionNameToMarkdown: {
[connectDocSections.introduction]: IntroMarkdown,
@@ -79,10 +66,7 @@ const docsInfoConfig: DocsInfoConfig = {
},
menuSubsectionToVersionWhenIntroduced: {},
sections: connectDocSections,
- visibleConstructors: [
- connectDocSections.httpClient,
- connectDocSections.webSocketOrderbookChannel,
- ],
+ visibleConstructors: [connectDocSections.httpClient, connectDocSections.webSocketOrderbookChannel],
convertToDocAgnosticFormatFn: typeDocUtils.convertToDocAgnosticFormat.bind(typeDocUtils),
};
const docsInfo = new DocsInfo(docsInfoConfig);
@@ -107,5 +91,6 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
dispatcher: new Dispatcher(dispatch),
});
-export const Documentation: React.ComponentClass<DocumentationAllProps> =
- connect(mapStateToProps, mapDispatchToProps)(DocumentationComponent);
+export const Documentation: React.ComponentClass<DocumentationAllProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocumentationComponent,
+);
diff --git a/packages/website/ts/containers/generate_order_form.tsx b/packages/website/ts/containers/generate_order_form.tsx
index a47895d94..1508b93d1 100644
--- a/packages/website/ts/containers/generate_order_form.tsx
+++ b/packages/website/ts/containers/generate_order_form.tsx
@@ -1,11 +1,11 @@
import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import * as React from 'react';
-import {connect} from 'react-redux';
-import {Blockchain} from 'ts/blockchain';
-import {GenerateOrderForm as GenerateOrderFormComponent} from 'ts/components/generate_order/generate_order_form';
-import {Dispatcher} from 'ts/redux/dispatcher';
-import {State} from 'ts/redux/reducer';
+import { connect } from 'react-redux';
+import { Blockchain } from 'ts/blockchain';
+import { GenerateOrderForm as GenerateOrderFormComponent } from 'ts/components/generate_order/generate_order_form';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
import {
BlockchainErrs,
HashData,
@@ -49,5 +49,6 @@ const mapStateToProps = (state: State, ownProps: GenerateOrderFormProps): Connec
userAddress: state.userAddress,
});
-export const GenerateOrderForm: React.ComponentClass<GenerateOrderFormProps> =
- connect(mapStateToProps)(GenerateOrderFormComponent);
+export const GenerateOrderForm: React.ComponentClass<GenerateOrderFormProps> = connect(mapStateToProps)(
+ GenerateOrderFormComponent,
+);
diff --git a/packages/website/ts/containers/portal.tsx b/packages/website/ts/containers/portal.tsx
index ae983e0f5..7ceaf1cf8 100644
--- a/packages/website/ts/containers/portal.tsx
+++ b/packages/website/ts/containers/portal.tsx
@@ -1,25 +1,17 @@
import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import * as React from 'react';
-import {connect} from 'react-redux';
-import {Dispatch} from 'redux';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
import {
Portal as PortalComponent,
PortalAllProps as PortalComponentAllProps,
PortalPassedProps as PortalComponentPassedProps,
} from 'ts/components/portal';
-import {Dispatcher} from 'ts/redux/dispatcher';
-import {State} from 'ts/redux/reducer';
-import {
- BlockchainErrs,
- HashData,
- Order,
- ScreenWidths,
- Side,
- TokenByAddress,
- TokenStateByAddress,
-} from 'ts/types';
-import {constants} from 'ts/utils/constants';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { BlockchainErrs, HashData, Order, ScreenWidths, Side, TokenByAddress, TokenStateByAddress } from 'ts/types';
+import { constants } from 'ts/utils/constants';
interface ConnectedState {
blockchainErr: BlockchainErrs;
@@ -35,7 +27,7 @@ interface ConnectedState {
shouldBlockchainErrDialogBeOpen: boolean;
userAddress: string;
userSuppliedOrderCache: Order;
- flashMessage?: string|React.ReactNode;
+ flashMessage?: string | React.ReactNode;
}
interface ConnectedDispatch {
@@ -45,14 +37,14 @@ interface ConnectedDispatch {
const mapStateToProps = (state: State, ownProps: PortalComponentAllProps): ConnectedState => {
const receiveAssetToken = state.sideToAssetToken[Side.Receive];
const depositAssetToken = state.sideToAssetToken[Side.Deposit];
- const receiveAddress = !_.isUndefined(receiveAssetToken.address) ?
- receiveAssetToken.address : constants.NULL_ADDRESS;
- const depositAddress = !_.isUndefined(depositAssetToken.address) ?
- depositAssetToken.address : constants.NULL_ADDRESS;
- const receiveAmount = !_.isUndefined(receiveAssetToken.amount) ?
- receiveAssetToken.amount : new BigNumber(0);
- const depositAmount = !_.isUndefined(depositAssetToken.amount) ?
- depositAssetToken.amount : new BigNumber(0);
+ const receiveAddress = !_.isUndefined(receiveAssetToken.address)
+ ? receiveAssetToken.address
+ : constants.NULL_ADDRESS;
+ const depositAddress = !_.isUndefined(depositAssetToken.address)
+ ? depositAssetToken.address
+ : constants.NULL_ADDRESS;
+ const receiveAmount = !_.isUndefined(receiveAssetToken.amount) ? receiveAssetToken.amount : new BigNumber(0);
+ const depositAmount = !_.isUndefined(depositAssetToken.amount) ? depositAssetToken.amount : new BigNumber(0);
const hashData = {
depositAmount,
depositTokenContractAddr: depositAddress,
@@ -88,5 +80,6 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
dispatcher: new Dispatcher(dispatch),
});
-export const Portal: React.ComponentClass<PortalComponentPassedProps> =
- connect(mapStateToProps, mapDispatchToProps)(PortalComponent);
+export const Portal: React.ComponentClass<PortalComponentPassedProps> = connect(mapStateToProps, mapDispatchToProps)(
+ PortalComponent,
+);
diff --git a/packages/website/ts/containers/smart_contracts_documentation.tsx b/packages/website/ts/containers/smart_contracts_documentation.tsx
index 34092748b..8be33b546 100644
--- a/packages/website/ts/containers/smart_contracts_documentation.tsx
+++ b/packages/website/ts/containers/smart_contracts_documentation.tsx
@@ -1,16 +1,13 @@
import * as _ from 'lodash';
import * as React from 'react';
-import {connect} from 'react-redux';
-import {Dispatch} from 'redux';
-import {DocsInfo} from 'ts/pages/documentation/docs_info';
-import {
- Documentation as DocumentationComponent,
- DocumentationAllProps,
-} from 'ts/pages/documentation/documentation';
-import {Dispatcher} from 'ts/redux/dispatcher';
-import {State} from 'ts/redux/reducer';
-import {DocsInfoConfig, SmartContractDocSections as Sections, WebsitePaths} from 'ts/types';
-import {doxityUtils} from 'ts/utils/doxity_utils';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocsInfo } from 'ts/pages/documentation/docs_info';
+import { Documentation as DocumentationComponent, DocumentationAllProps } from 'ts/pages/documentation/documentation';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { DocsInfoConfig, SmartContractDocSections as Sections, WebsitePaths } from 'ts/types';
+import { doxityUtils } from 'ts/utils/doxity_utils';
/* tslint:disable:no-var-requires */
const IntroMarkdown = require('md/docs/smart_contracts/introduction');
@@ -22,15 +19,8 @@ const docsInfoConfig: DocsInfoConfig = {
websitePath: WebsitePaths.SmartContracts,
docsJsonRoot: 'https://s3.amazonaws.com/smart-contracts-docs-json',
menu: {
- introduction: [
- Sections.Introduction,
- ],
- contracts: [
- Sections.Exchange,
- Sections.TokenRegistry,
- Sections.ZRXToken,
- Sections.TokenTransferProxy,
- ],
+ introduction: [Sections.Introduction],
+ contracts: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy],
},
sectionNameToMarkdown: {
[Sections.Introduction]: IntroMarkdown,
@@ -42,12 +32,7 @@ const docsInfoConfig: DocsInfoConfig = {
TokenRegistry: Sections.TokenRegistry,
ZRXToken: Sections.ZRXToken,
},
- visibleConstructors: [
- Sections.Exchange,
- Sections.TokenRegistry,
- Sections.ZRXToken,
- Sections.TokenTransferProxy,
- ],
+ visibleConstructors: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy],
convertToDocAgnosticFormatFn: doxityUtils.convertToDocAgnosticFormat.bind(doxityUtils),
};
const docsInfo = new DocsInfo(docsInfoConfig);
@@ -72,5 +57,6 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
docsInfo,
});
-export const Documentation: React.ComponentClass<DocumentationAllProps> =
- connect(mapStateToProps, mapDispatchToProps)(DocumentationComponent);
+export const Documentation: React.ComponentClass<DocumentationAllProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocumentationComponent,
+);
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.tsx b/packages/website/ts/containers/zero_ex_js_documentation.tsx
index 8e40a3fbc..8ae6a7b73 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.tsx
+++ b/packages/website/ts/containers/zero_ex_js_documentation.tsx
@@ -1,17 +1,14 @@
import * as _ from 'lodash';
import * as React from 'react';
-import {connect} from 'react-redux';
-import {Dispatch} from 'redux';
-import {DocsInfo} from 'ts/pages/documentation/docs_info';
-import {
- Documentation as DocumentationComponent,
- DocumentationAllProps,
-} from 'ts/pages/documentation/documentation';
-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';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocsInfo } from 'ts/pages/documentation/docs_info';
+import { Documentation as DocumentationComponent, DocumentationAllProps } from 'ts/pages/documentation/documentation';
+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 */
const IntroMarkdown = require('md/docs/0xjs/introduction');
@@ -45,20 +42,10 @@ const docsInfoConfig: DocsInfoConfig = {
websitePath: WebsitePaths.ZeroExJs,
docsJsonRoot: 'https://s3.amazonaws.com/0xjs-docs-jsons',
menu: {
- introduction: [
- zeroExJsDocSections.introduction,
- ],
- install: [
- zeroExJsDocSections.installation,
- ],
- topics: [
- zeroExJsDocSections.async,
- zeroExJsDocSections.errors,
- zeroExJsDocSections.versioning,
- ],
- zeroEx: [
- zeroExJsDocSections.zeroEx,
- ],
+ introduction: [zeroExJsDocSections.introduction],
+ install: [zeroExJsDocSections.installation],
+ topics: [zeroExJsDocSections.async, zeroExJsDocSections.errors, zeroExJsDocSections.versioning],
+ zeroEx: [zeroExJsDocSections.zeroEx],
contracts: [
zeroExJsDocSections.exchange,
zeroExJsDocSections.token,
@@ -66,12 +53,8 @@ const docsInfoConfig: DocsInfoConfig = {
zeroExJsDocSections.etherToken,
zeroExJsDocSections.proxy,
],
- orderWatcher: [
- zeroExJsDocSections.orderWatcher,
- ],
- types: [
- zeroExJsDocSections.types,
- ],
+ orderWatcher: [zeroExJsDocSections.orderWatcher],
+ types: [zeroExJsDocSections.types],
},
sectionNameToMarkdown: {
[zeroExJsDocSections.introduction]: IntroMarkdown,
@@ -182,5 +165,6 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
dispatcher: new Dispatcher(dispatch),
});
-export const Documentation: React.ComponentClass<DocumentationAllProps> =
- connect(mapStateToProps, mapDispatchToProps)(DocumentationComponent);
+export const Documentation: React.ComponentClass<DocumentationAllProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocumentationComponent,
+);