WIP/customers

This commit is contained in:
elforjani3
2020-06-14 13:27:36 +02:00
parent 4d1dd14f8d
commit e20c912a3d
17 changed files with 544 additions and 42 deletions

View File

@@ -0,0 +1,18 @@
import { connect } from 'react-redux';
import { getCustomersItems } from 'store/customers/customers.selectors';
import { getResourceViews } from 'store/customViews/customViews.selectors';
export default (mapState) => {
const mapStateToProps = (state, props) => {
const mapped = {
customersViews: getResourceViews(state, 'customers'),
customers: getCustomersItems(state, state.customers.currentViewId),
customersLoading: state.customers.loading,
customerErrors: state.customers.errors,
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};