2017-07-06 14:03:20 +02:00
|
|
|
/*
|
|
|
|
|
*
|
|
|
|
|
* Home
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { connect } from 'react-redux';
|
2017-07-13 16:55:59 +02:00
|
|
|
import { bindActionCreators } from 'redux';
|
2017-07-06 14:03:20 +02:00
|
|
|
import Helmet from 'react-helmet';
|
|
|
|
|
import selectHome from './selectors';
|
2017-07-13 16:55:59 +02:00
|
|
|
import { configFetch } from './actions'
|
2017-07-06 14:03:20 +02:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-06 14:03:20 +02:00
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<div className={styles.home}>
|
2017-07-06 16:18:43 +02:00
|
|
|
<Helmet
|
|
|
|
|
title="Home"
|
|
|
|
|
meta={[
|
|
|
|
|
{ name: 'description', content: 'Description of Home' },
|
|
|
|
|
]}
|
|
|
|
|
/>
|
2017-07-06 14:03:20 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = selectHome();
|
|
|
|
|
|
|
|
|
|
function mapDispatchToProps(dispatch) {
|
2017-07-13 16:55:59 +02:00
|
|
|
return bindActionCreators(
|
|
|
|
|
{
|
|
|
|
|
configFetch,
|
|
|
|
|
},
|
|
|
|
|
dispatch
|
|
|
|
|
)
|
2017-07-06 14:03:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Home);
|