aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/footer.tsx
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/components/footer.tsx
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/components/footer.tsx')
-rw-r--r--packages/website/ts/components/footer.tsx7
1 files changed, 3 insertions, 4 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);
}
}