2019-01-31 08:55:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
import Header from '../components/Header/Header.js';
|
|
|
|
|
import { setUserPreferencesModalOpen } from '../redux/actions.js';
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => {
|
|
|
|
|
return {
|
2019-05-29 14:39:54 +02:00
|
|
|
isOpen: state.ui.userPreferencesModalOpen,
|
2019-01-31 08:55:05 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
|
|
|
return {
|
|
|
|
|
openUserPreferencesModal: () => {
|
|
|
|
|
dispatch(setUserPreferencesModalOpen(true));
|
2019-05-29 14:39:54 +02:00
|
|
|
},
|
2019-01-31 08:55:05 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const ConnectedHeader = connect(
|
|
|
|
|
mapStateToProps,
|
|
|
|
|
mapDispatchToProps
|
|
|
|
|
)(Header);
|
|
|
|
|
|
|
|
|
|
export default ConnectedHeader;
|