diff --git a/js/components/Shade.jsx b/js/components/Shade.jsx index 125f538f..8912b0e2 100644 --- a/js/components/Shade.jsx +++ b/js/components/Shade.jsx @@ -3,20 +3,10 @@ import {connect} from 'react-redux'; import {TOGGLE_SHADE_MODE} from '../actionTypes'; -class Shade extends React.Component { - constructor(props) { - super(props); - this.handleClick = this.handleClick.bind(this); - } - handleClick() { - this.props.dispatch({type: TOGGLE_SHADE_MODE}); - } - render() { - return
; - } -} +const Shade = (props) =>
; -module.exports = connect()(Shade); +const mapDispatchToProps = (dispatch) => ({ + handleClick: dispatch({type: TOGGLE_SHADE_MODE}) +}); + +module.exports = connect(() => {}, mapDispatchToProps)(Shade);