diff options
author | Jacob Evans <dekz@dekz.net> | 2018-02-27 10:12:11 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-02-27 10:47:09 +0800 |
commit | 6961169f89c4cd8480aca9c720cd8299aec9bbc0 (patch) | |
tree | 51b9a6a2f0dbaee50a9758a7983fe201d5898354 /packages/website/ts/containers | |
parent | 3d66feb89f8e4cfcb0b5251a96d02ef31f3ae34b (diff) | |
parent | 709fa9e02ec21cee9fc145b4a578742c8dd190aa (diff) | |
download | dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar.gz dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar.bz2 dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar.lz dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar.xz dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.tar.zst dexon-sol-tools-6961169f89c4cd8480aca9c720cd8299aec9bbc0.zip |
Merge branch 'development' into feature/0x.js/lowercase-addresses
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r-- | packages/website/ts/containers/about.tsx | 26 | ||||
-rw-r--r-- | packages/website/ts/containers/connect_documentation.tsx | 3 | ||||
-rw-r--r-- | packages/website/ts/containers/faq.tsx | 26 | ||||
-rw-r--r-- | packages/website/ts/containers/landing.tsx | 28 | ||||
-rw-r--r-- | packages/website/ts/containers/not_found.tsx | 28 | ||||
-rw-r--r-- | packages/website/ts/containers/portal.tsx | 3 | ||||
-rw-r--r-- | packages/website/ts/containers/smart_contracts_documentation.tsx | 3 | ||||
-rw-r--r-- | packages/website/ts/containers/wiki.tsx | 26 | ||||
-rw-r--r-- | packages/website/ts/containers/zero_ex_js_documentation.tsx | 3 |
9 files changed, 146 insertions, 0 deletions
diff --git a/packages/website/ts/containers/about.tsx b/packages/website/ts/containers/about.tsx new file mode 100644 index 000000000..ce8fd3afb --- /dev/null +++ b/packages/website/ts/containers/about.tsx @@ -0,0 +1,26 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { About as AboutComponent, AboutProps } from 'ts/pages/about/about'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, ownProps: AboutProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const About: React.ComponentClass<AboutProps> = connect(mapStateToProps, mapDispatchToProps)(AboutComponent); diff --git a/packages/website/ts/containers/connect_documentation.tsx b/packages/website/ts/containers/connect_documentation.tsx index 79eafa431..5c5d26b44 100644 --- a/packages/website/ts/containers/connect_documentation.tsx +++ b/packages/website/ts/containers/connect_documentation.tsx @@ -9,6 +9,7 @@ import { State } from 'ts/redux/reducer'; import { DocsInfoConfig, Environments, WebsitePaths } from 'ts/types'; import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; import { typeDocUtils } from 'ts/utils/typedoc_utils'; /* tslint:disable:no-var-requires */ @@ -84,6 +85,7 @@ interface ConnectedState { docsVersion: string; availableDocVersions: string[]; docsInfo: DocsInfo; + translate: Translate; } interface ConnectedDispatch { @@ -93,6 +95,7 @@ interface ConnectedDispatch { const mapStateToProps = (state: State, ownProps: DocumentationAllProps): ConnectedState => ({ docsVersion: state.docsVersion, availableDocVersions: state.availableDocVersions, + translate: state.translate, docsInfo, }); diff --git a/packages/website/ts/containers/faq.tsx b/packages/website/ts/containers/faq.tsx new file mode 100644 index 000000000..b539e33c9 --- /dev/null +++ b/packages/website/ts/containers/faq.tsx @@ -0,0 +1,26 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { FAQ as FAQComponent, FAQProps } from 'ts/pages/faq/faq'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, ownProps: FAQProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const FAQ: React.ComponentClass<FAQProps> = connect(mapStateToProps, mapDispatchToProps)(FAQComponent); diff --git a/packages/website/ts/containers/landing.tsx b/packages/website/ts/containers/landing.tsx new file mode 100644 index 000000000..a620bb12e --- /dev/null +++ b/packages/website/ts/containers/landing.tsx @@ -0,0 +1,28 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { Landing as LandingComponent, LandingProps } from 'ts/pages/landing/landing'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, ownProps: LandingProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Landing: React.ComponentClass<LandingProps> = connect(mapStateToProps, mapDispatchToProps)( + LandingComponent, +); diff --git a/packages/website/ts/containers/not_found.tsx b/packages/website/ts/containers/not_found.tsx new file mode 100644 index 000000000..dd151e2c8 --- /dev/null +++ b/packages/website/ts/containers/not_found.tsx @@ -0,0 +1,28 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { NotFound as NotFoundComponent, NotFoundProps } from 'ts/pages/not_found'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, ownProps: NotFoundProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const NotFound: React.ComponentClass<NotFoundProps> = connect(mapStateToProps, mapDispatchToProps)( + NotFoundComponent, +); diff --git a/packages/website/ts/containers/portal.tsx b/packages/website/ts/containers/portal.tsx index bcca0d70f..befa16bdb 100644 --- a/packages/website/ts/containers/portal.tsx +++ b/packages/website/ts/containers/portal.tsx @@ -8,6 +8,7 @@ import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; import { BlockchainErrs, HashData, Order, ProviderType, ScreenWidths, Side, TokenByAddress } from 'ts/types'; import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; interface ConnectedState { blockchainErr: BlockchainErrs; @@ -26,6 +27,7 @@ interface ConnectedState { userAddress: string; userSuppliedOrderCache: Order; flashMessage?: string | React.ReactNode; + translate: Translate; } interface ConnectedDispatch { @@ -73,6 +75,7 @@ const mapStateToProps = (state: State, ownProps: PortalComponentAllProps): Conne userEtherBalance: state.userEtherBalance, userSuppliedOrderCache: state.userSuppliedOrderCache, flashMessage: state.flashMessage, + translate: state.translate, }; }; diff --git a/packages/website/ts/containers/smart_contracts_documentation.tsx b/packages/website/ts/containers/smart_contracts_documentation.tsx index 8be33b546..c4731f929 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.tsx +++ b/packages/website/ts/containers/smart_contracts_documentation.tsx @@ -8,6 +8,7 @@ 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 { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ const IntroMarkdown = require('md/docs/smart_contracts/introduction'); @@ -40,6 +41,7 @@ const docsInfo = new DocsInfo(docsInfoConfig); interface ConnectedState { docsVersion: string; availableDocVersions: string[]; + translate: Translate; } interface ConnectedDispatch { @@ -50,6 +52,7 @@ interface ConnectedDispatch { const mapStateToProps = (state: State, ownProps: DocumentationAllProps): ConnectedState => ({ docsVersion: state.docsVersion, availableDocVersions: state.availableDocVersions, + translate: state.translate, }); const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/wiki.tsx b/packages/website/ts/containers/wiki.tsx new file mode 100644 index 000000000..2cb87d0a1 --- /dev/null +++ b/packages/website/ts/containers/wiki.tsx @@ -0,0 +1,26 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { Wiki as WikiComponent, WikiProps } from 'ts/pages/wiki/wiki'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, ownProps: WikiProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Wiki: React.ComponentClass<WikiProps> = connect(mapStateToProps, mapDispatchToProps)(WikiComponent); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.tsx b/packages/website/ts/containers/zero_ex_js_documentation.tsx index eee2c7cc8..a32a87f7f 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.tsx +++ b/packages/website/ts/containers/zero_ex_js_documentation.tsx @@ -9,6 +9,7 @@ import { State } from 'ts/redux/reducer'; import { DocsInfoConfig, Environments, WebsitePaths } from 'ts/types'; import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; import { typeDocUtils } from 'ts/utils/typedoc_utils'; /* tslint:disable:no-var-requires */ @@ -154,6 +155,7 @@ interface ConnectedState { docsVersion: string; availableDocVersions: string[]; docsInfo: DocsInfo; + translate: Translate; } interface ConnectedDispatch { @@ -164,6 +166,7 @@ const mapStateToProps = (state: State, ownProps: DocumentationAllProps): Connect docsVersion: state.docsVersion, availableDocVersions: state.availableDocVersions, docsInfo, + translate: state.translate, }); const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ |