diff --git a/common/components/Header/index.jsx b/common/components/Header/index.jsx index 52d76a9e..ff5812f1 100644 --- a/common/components/Header/index.jsx +++ b/common/components/Header/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import NodeDropdownComponent from './components/NodeDropdownComponent' import LanguageDropDownComponent from './components/LanguageDropdownComponent' +import PropTypes from 'prop-types'; export default class Header extends Component { constructor(props) { @@ -8,17 +9,48 @@ export default class Header extends Component { } static propTypes = { - title: React.PropTypes.string, - toggleSidebar: React.PropTypes.func, - onHeaderRightButtonClick: React.PropTypes.func, - isLoggedIn: React.PropTypes.bool + // LanguageDropDownComponentProps + changeLanguage: PropTypes.func, + toggleLanguageDropdown: PropTypes.func, + languageSelection: PropTypes.number, + languageToggle: PropTypes.bool, + // NodeDropdownComponentProps + changeNode: PropTypes.func, + toggleNodeDropdown: PropTypes.func, + nodeSelection: PropTypes.number, + nodeToggle: PropTypes.bool }; render() { + let { + languageSelection, + changeLanguage, + toggleLanguageDropdown, + languageToggle, + changeNode, + toggleNodeDropdown, + nodeSelection, + nodeToggle + } = this.props; + + let LanguageDropDownComponentProps = { + languageSelection, + changeLanguage, + toggleLanguageDropdown, + languageToggle, + } + + let NodeDropdownComponentProps = { + changeNode, + toggleNodeDropdown, + nodeSelection, + nodeToggle + } + return (
- + {/* TODO - don't hardcode image path*/}     - +     - +