madiator.com/ui/component/homepageSelector/index.js

15 lines
416 B
JavaScript
Raw Permalink Normal View History

2021-08-16 12:11:25 +02:00
import { connect } from 'react-redux';
import SelectHomepage from './view';
import { doSetHomepage } from 'redux/actions/settings';
import { selectHomepageCode } from 'redux/selectors/settings';
const select = state => ({
homepage: selectHomepageCode(state),
});
const perform = dispatch => ({
setHomepage: value => dispatch(doSetHomepage(value)),
});
export default connect(select, perform)(SelectHomepage);