48 lines
1015 B
JavaScript
Raw Normal View History

/*
*
* Home
*
*/
import React from 'react';
import { connect } from 'react-redux';
2017-07-13 16:55:59 +02:00
import { bindActionCreators } from 'redux';
import Helmet from 'react-helmet';
import selectHome from './selectors';
2017-07-13 16:55:59 +02:00
import { configFetch } from './actions'
import styles from './styles.scss';
export class Home extends React.Component { // eslint-disable-line react/prefer-stateless-function
2017-07-13 16:55:59 +02:00
componentWillReceiveProps(nextProps) {
if (this.props.params.slug !== nextProps.params.slug) {
// this.props.configFetch(nextProps.params.slug);
}
}
render() {
return (
<div className={styles.home}>
2017-07-06 16:18:43 +02:00
<Helmet
title="Home"
meta={[
{ name: 'description', content: 'Description of Home' },
]}
/>
</div>
);
}
}
const mapStateToProps = selectHome();
function mapDispatchToProps(dispatch) {
2017-07-13 16:55:59 +02:00
return bindActionCreators(
{
configFetch,
},
dispatch
)
}
export default connect(mapStateToProps, mapDispatchToProps)(Home);