aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/footer.tsx7
-rw-r--r--packages/website/ts/components/portal.tsx4
2 files changed, 6 insertions, 5 deletions
diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx
index 896b36931..2d03ca576 100644
--- a/packages/website/ts/components/footer.tsx
+++ b/packages/website/ts/components/footer.tsx
@@ -3,6 +3,7 @@ import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
import { Link } from 'react-router-dom';
+import { Dispatcher } from 'ts/redux/dispatcher';
import { Deco, Key, Language, WebsitePaths } from 'ts/types';
import { colors } from 'ts/utils/colors';
import { constants } from 'ts/utils/constants';
@@ -35,7 +36,7 @@ const languageToMenuTitle = {
export interface FooterProps {
translate?: Translate;
- onLanguageSelected?: (language: Language) => void;
+ dispatcher: Dispatcher;
}
interface FooterState {
@@ -243,8 +244,6 @@ export class Footer extends React.Component<FooterProps, FooterState> {
this.setState({
selectedLanguage: value,
});
- if (!_.isUndefined(this.props.onLanguageSelected)) {
- this.props.onLanguageSelected(value);
- }
+ this.props.dispatcher.updateSelectedLanguage(value);
}
}
diff --git a/packages/website/ts/components/portal.tsx b/packages/website/ts/components/portal.tsx
index 0409f28c0..71f756a89 100644
--- a/packages/website/ts/components/portal.tsx
+++ b/packages/website/ts/components/portal.tsx
@@ -27,6 +27,7 @@ import { BlockchainErrs, HashData, Order, ProviderType, ScreenWidths, TokenByAdd
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 THROTTLE_TIMEOUT = 100;
@@ -52,6 +53,7 @@ export interface PortalAllProps {
location: Location;
flashMessage?: string | React.ReactNode;
lastForceTokenStateRefetch: number;
+ translate: Translate;
}
interface PortalAllState {
@@ -259,7 +261,7 @@ export class Portal extends React.Component<PortalAllProps, PortalAllState> {
/>
)}
</div>
- <Footer />;
+ <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
</div>
);
}