You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
679 B
25 lines
679 B
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import FilterModal from 'Components/Filter/FilterModal';
|
|
import { setBookshelfFilter } from 'Store/Actions/bookshelfActions';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
(state) => state.authors.items,
|
|
(state) => state.bookshelf.filterBuilderProps,
|
|
(sectionItems, filterBuilderProps) => {
|
|
return {
|
|
sectionItems,
|
|
filterBuilderProps,
|
|
customFilterType: 'bookshelf'
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
const mapDispatchToProps = {
|
|
dispatchSetFilter: setBookshelfFilter
|
|
};
|
|
|
|
export default connect(createMapStateToProps, mapDispatchToProps)(FilterModal);
|