aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-22 03:46:16 +0800
committerFabio Berger <me@fabioberger.com>2018-02-22 03:46:16 +0800
commite2d17d122e25feeabb1d5499065274ec6e30bd4f (patch)
tree3b6db4ea36eea523b09e8aa0199111b0c98eedb1 /packages/website/ts/pages
parent0d7bf505810602e73b168bde6887f76e315c50ae (diff)
downloaddexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar.gz
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar.bz2
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar.lz
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar.xz
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.tar.zst
dexon-sol-tools-e2d17d122e25feeabb1d5499065274ec6e30bd4f.zip
Keep topBar and footer language to the one picked by the user
Diffstat (limited to 'packages/website/ts/pages')
-rw-r--r--packages/website/ts/pages/about/about.tsx7
-rw-r--r--packages/website/ts/pages/documentation/documentation.tsx3
-rw-r--r--packages/website/ts/pages/faq/faq.tsx8
-rw-r--r--packages/website/ts/pages/landing/landing.tsx2
-rw-r--r--packages/website/ts/pages/not_found.tsx8
-rw-r--r--packages/website/ts/pages/wiki/wiki.tsx5
6 files changed, 27 insertions, 6 deletions
diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx
index 0889e79f3..b99dc34ab 100644
--- a/packages/website/ts/pages/about/about.tsx
+++ b/packages/website/ts/pages/about/about.tsx
@@ -4,9 +4,11 @@ import * as DocumentTitle from 'react-document-title';
import { Footer } from 'ts/components/footer';
import { TopBar } from 'ts/components/top_bar/top_bar';
import { Profile } from 'ts/pages/about/profile';
+import { Dispatcher } from 'ts/redux/dispatcher';
import { ProfileInfo, Styles } from 'ts/types';
import { colors } from 'ts/utils/colors';
import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
import { utils } from 'ts/utils/utils';
const teamRow1: ProfileInfo[] = [
@@ -143,6 +145,8 @@ const advisors: ProfileInfo[] = [
export interface AboutProps {
source: string;
location: Location;
+ translate: Translate;
+ dispatcher: Dispatcher;
}
interface AboutState {}
@@ -174,6 +178,7 @@ export class About extends React.Component<AboutProps, AboutState> {
blockchainIsLoaded={false}
location={this.props.location}
style={{ backgroundColor: colors.lightestGrey }}
+ translate={this.props.translate}
/>
<div id="about" className="mx-auto max-width-4 py4" style={{ color: colors.grey800 }}>
<div className="mx-auto pb4 sm-px3" style={{ maxWidth: 435 }}>
@@ -230,7 +235,7 @@ export class About extends React.Component<AboutProps, AboutState> {
</div>
</div>
</div>
- <Footer />
+ <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
</div>
);
}
diff --git a/packages/website/ts/pages/documentation/documentation.tsx b/packages/website/ts/pages/documentation/documentation.tsx
index da3728a60..285471166 100644
--- a/packages/website/ts/pages/documentation/documentation.tsx
+++ b/packages/website/ts/pages/documentation/documentation.tsx
@@ -35,6 +35,7 @@ import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
import { docUtils } from 'ts/utils/doc_utils';
+import { Translate } from 'ts/utils/translate';
import { utils } from 'ts/utils/utils';
const TOP_BAR_HEIGHT = 60;
@@ -54,6 +55,7 @@ export interface DocumentationAllProps {
docsVersion: string;
availableDocVersions: string[];
docsInfo: DocsInfo;
+ translate: Translate;
}
interface DocumentationState {
@@ -114,6 +116,7 @@ export class Documentation extends React.Component<DocumentationAllProps, Docume
menu={this.props.docsInfo.getMenu(this.props.docsVersion)}
menuSubsectionsBySection={menuSubsectionsBySection}
docsInfo={this.props.docsInfo}
+ translate={this.props.translate}
/>
{_.isUndefined(this.state.docAgnosticFormat) ? (
<div className="col col-12" style={styles.mainContainers}>
diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx
index 0a7eecc2d..34175abdc 100644
--- a/packages/website/ts/pages/faq/faq.tsx
+++ b/packages/website/ts/pages/faq/faq.tsx
@@ -4,14 +4,18 @@ import * as DocumentTitle from 'react-document-title';
import { Footer } from 'ts/components/footer';
import { TopBar } from 'ts/components/top_bar/top_bar';
import { Question } from 'ts/pages/faq/question';
+import { Dispatcher } from 'ts/redux/dispatcher';
import { FAQQuestion, FAQSection, Styles, WebsitePaths } from 'ts/types';
import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
export interface FAQProps {
source: string;
location: Location;
+ translate: Translate;
+ dispatcher: Dispatcher;
}
interface FAQState {}
@@ -407,14 +411,14 @@ export class FAQ extends React.Component<FAQProps, FAQState> {
return (
<div>
<DocumentTitle title="0x FAQ" />
- <TopBar blockchainIsLoaded={false} location={this.props.location} />
+ <TopBar blockchainIsLoaded={false} location={this.props.location} translate={this.props.translate} />
<div id="faq" className="mx-auto max-width-4 pt4" style={{ color: colors.grey800 }}>
<h1 className="center" style={{ ...styles.thin }}>
0x FAQ
</h1>
<div className="sm-px2 md-px2 lg-px0 pb4">{this._renderSections()}</div>
</div>
- <Footer />
+ <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
</div>
);
}
diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx
index 5a231b99d..a269bd72a 100644
--- a/packages/website/ts/pages/landing/landing.tsx
+++ b/packages/website/ts/pages/landing/landing.tsx
@@ -212,7 +212,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
{this._renderBuildingBlocksSection()}
{this._renderUseCases()}
{this._renderCallToAction()}
- <Footer translate={this.props.translate} onLanguageSelected={this._onLanguageSelected.bind(this)} />
+ <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
</div>
);
}
diff --git a/packages/website/ts/pages/not_found.tsx b/packages/website/ts/pages/not_found.tsx
index 0a6ec071c..ad37f6242 100644
--- a/packages/website/ts/pages/not_found.tsx
+++ b/packages/website/ts/pages/not_found.tsx
@@ -2,10 +2,14 @@ import * as _ from 'lodash';
import * as React from 'react';
import { Footer } from 'ts/components/footer';
import { TopBar } from 'ts/components/top_bar/top_bar';
+import { Dispatcher } from 'ts/redux/dispatcher';
import { Styles } from 'ts/types';
+import { Translate } from 'ts/utils/translate';
export interface NotFoundProps {
location: Location;
+ translate: Translate;
+ dispatcher: Dispatcher;
}
interface NotFoundState {}
@@ -20,7 +24,7 @@ export class NotFound extends React.Component<NotFoundProps, NotFoundState> {
public render() {
return (
<div>
- <TopBar blockchainIsLoaded={false} location={this.props.location} />
+ <TopBar blockchainIsLoaded={false} location={this.props.location} translate={this.props.translate} />
<div className="mx-auto max-width-4 py4">
<div className="center py4">
<div className="py4">
@@ -35,7 +39,7 @@ export class NotFound extends React.Component<NotFoundProps, NotFoundState> {
</div>
</div>
</div>
- <Footer />
+ <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
</div>
);
}
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx
index bbbda6eee..56c3be0fe 100644
--- a/packages/website/ts/pages/wiki/wiki.tsx
+++ b/packages/website/ts/pages/wiki/wiki.tsx
@@ -8,10 +8,12 @@ import { TopBar } from 'ts/components/top_bar/top_bar';
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 { Article, ArticlesBySection, HeaderSizes, Styles, WebsitePaths } from 'ts/types';
import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
import { utils } from 'ts/utils/utils';
const TOP_BAR_HEIGHT = 60;
@@ -20,6 +22,8 @@ const WIKI_NOT_READY_BACKOUT_TIMEOUT_MS = 5000;
export interface WikiProps {
source: string;
location: Location;
+ dispatcher: Dispatcher;
+ translate: Translate;
}
interface WikiState {
@@ -79,6 +83,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
blockchainIsLoaded={false}
location={this.props.location}
menuSubsectionsBySection={menuSubsectionsBySection}
+ translate={this.props.translate}
/>
{_.isUndefined(this.state.articlesBySection) ? (
<div className="col col-12" style={mainContainersStyle}>