25 lines
672 B
JavaScript
25 lines
672 B
JavaScript
import { connect } from 'react-redux';
|
|
import { openDetail, rebuildLayout } from '../../redux/actions/ui';
|
|
import CatalogList from './CatalogList';
|
|
|
|
const mapStateToProps = state => {
|
|
return {
|
|
items: state.catalog,
|
|
ads: state.ads,
|
|
showingSearchResults: state.ui.showingSearchResults,
|
|
magnetInstance: state.ui.magnetInstance,
|
|
isInternal: state.ui.isInternal
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
return {
|
|
openDetail: item => dispatch(openDetail(item)),
|
|
rebuildLayout: shuffle => dispatch(rebuildLayout(shuffle))
|
|
};
|
|
};
|
|
|
|
const CatalogListContainer = connect(mapStateToProps, mapDispatchToProps)(CatalogList);
|
|
|
|
export default CatalogListContainer;
|