aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-22 09:09:33 +0800
committerGitHub <noreply@github.com>2018-02-22 09:09:33 +0800
commitdfe2579eebdaf348bb2e5690f901ca717c5f6392 (patch)
tree59a0d97371fd69f79a54f6dd4f6c602561f04115 /packages/website/ts/containers
parentbe19316dfb45600b2ce264a90dde7ace460fd0ac (diff)
parent1b3a9102f1d9c83ca6675a0e95cea6c4ceab01eb (diff)
downloaddexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar.gz
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar.bz2
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar.lz
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar.xz
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.tar.zst
dexon-sol-tools-dfe2579eebdaf348bb2e5690f901ca717c5f6392.zip
Merge pull request #410 from 0xProject/translateHomepage
Translate Landing Page
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r--packages/website/ts/containers/about.tsx26
-rw-r--r--packages/website/ts/containers/connect_documentation.tsx3
-rw-r--r--packages/website/ts/containers/faq.tsx26
-rw-r--r--packages/website/ts/containers/landing.tsx28
-rw-r--r--packages/website/ts/containers/not_found.tsx28
-rw-r--r--packages/website/ts/containers/portal.tsx3
-rw-r--r--packages/website/ts/containers/smart_contracts_documentation.tsx3
-rw-r--r--packages/website/ts/containers/wiki.tsx26
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.tsx3
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 => ({