diff --git a/public/components/header/Header.jsx b/public/components/header/Header.jsx index 86673c5..c377649 100644 --- a/public/components/header/Header.jsx +++ b/public/components/header/Header.jsx @@ -24,7 +24,7 @@ import React from 'react'; import Navbar from '@components/nav/navbar/Navbar'; -export default function(props) { +export default (props) => { return (
diff --git a/public/components/nav/menu/HamburgerMenu.jsx b/public/components/nav/menu/HamburgerMenu.jsx index 5c6b19f..0887689 100644 --- a/public/components/nav/menu/HamburgerMenu.jsx +++ b/public/components/nav/menu/HamburgerMenu.jsx @@ -24,14 +24,18 @@ import React from 'react'; import { connect } from 'react-redux'; import { NavLink } from 'react-router-dom'; + import Language from '@public/language/Language'; import * as MenuActions from '@public/actions/MenuActions'; -const HamburerMenuItem = function(props) { +const HamburerMenuItem = (props) => { + let { lang, link, className } = props; + className = className || ""; + return ( -
  • +
  • - { Language.get(props.lang) } + { Language.get(lang) }
  • ); @@ -43,43 +47,38 @@ class HamburgerMenu extends React.Component { } render() { + let { open, className, toggleMenu } = this.props; + let clazz = "c-hamburger-menu"; - if(this.props.open) clazz += " is-open"; - if(this.props.className) clazz += " " + this.props.className; + if(open) clazz += " is-open"; + if(className) clazz += ` ${className}`; return (
    - -
    +
    +
    ); } } -const mapStateToProps = function(state) { +const mapStateToProps = (state) => { return { open: state.menu.open, language: state.language.code } } -const mapDispatchToProps = function(dispatch) { +const mapDispatchToProps = (dispatch) => { return { toggleMenu: function(theme) { dispatch(MenuActions.toggleMenu());