Move wrapWidth handling out of MessageBox, improve scroll position handling, use custom routing, close menu when clicking anywhere

This commit is contained in:
Ken-Håvard Lieng 2017-05-07 22:19:15 +02:00
parent a753efd1dd
commit fec7c93abc
24 changed files with 363 additions and 235 deletions

View file

@ -0,0 +1,20 @@
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
class Route extends PureComponent {
render() {
if (this.props.route === this.props.name) {
return this.props.children;
}
return null;
}
}
const getRoute = state => state.router.route;
const mapStateToProps = createStructuredSelector({
route: getRoute
});
export default connect(mapStateToProps)(Route);