50 lines
1.3 KiB
JavaScript
Raw Normal View History

2016-08-18 11:41:13 +02:00
/*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
2016-08-18 11:47:26 +02:00
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor it and remove
* the linting exception.
2016-08-18 11:41:13 +02:00
*/
import React from 'react';
2016-08-19 13:57:50 +02:00
import { connect } from 'react-redux';
2016-09-30 18:25:04 +02:00
import { createStructuredSelector } from 'reselect';
2016-08-26 13:28:12 +02:00
import { selectPlugins } from 'containers/App/selectors';
import LeftMenu from 'containers/LeftMenu';
import Header from 'components/Header/index';
import Content from 'containers/Content';
2016-08-24 15:09:42 +02:00
import styles from './syles.scss';
2016-08-18 11:41:13 +02:00
2016-08-19 13:57:50 +02:00
export class HomePage extends React.Component { // eslint-disable-line react/prefer-stateless-function
2016-08-18 11:41:13 +02:00
render() {
return (
2016-08-19 14:14:33 +02:00
<div className={styles.homePage}>
2016-08-19 13:57:50 +02:00
<LeftMenu {...this.props}></LeftMenu>
2016-08-24 15:09:42 +02:00
<div className={styles.homePageRightWrapper}>
2016-08-19 14:17:17 +02:00
<Header></Header>
2016-08-26 14:35:59 +02:00
<Content {...this.props}></Content>
2016-08-19 14:17:17 +02:00
</div>
2016-08-19 13:57:50 +02:00
</div>
2016-08-18 11:41:13 +02:00
);
}
}
2016-08-19 13:57:50 +02:00
HomePage.propTypes = {
plugins: React.PropTypes.object,
};
2016-09-30 18:25:04 +02:00
const mapStateToProps = createStructuredSelector({
plugins: selectPlugins(),
});
2016-08-19 13:57:50 +02:00
function mapDispatchToProps(dispatch) {
return {
dispatch,
};
}
export default connect(mapStateToProps, mapDispatchToProps)(HomePage);