dispatch/client/src/js/components/Navicon.js

17 lines
404 B
JavaScript
Raw Normal View History

2015-12-28 23:34:32 +00:00
import React, { Component } from 'react';
import { connect } from 'react-redux';
import pure from 'pure-render-decorator';
import { toggleMenu } from '../actions/tab';
@pure
class Navicon extends Component {
render() {
const { dispatch } = this.props;
return (
<i className="icon-menu navicon" onClick={() => dispatch(toggleMenu())}></i>
);
}
}
export default connect()(Navicon);