Files
bigcapital/client/src/containers/Vendors/withVendorDetail.js
2020-11-18 15:12:22 +02:00

11 lines
315 B
JavaScript

import { connect } from 'react-redux';
import { getVendorByIdFactory } from 'store/vendors/vendors.selectors';
export default () => {
const getVendorById = getVendorByIdFactory();
const mapStateToProps = (state, props) => ({
vendor: getVendorById(state, props),
});
return connect(mapStateToProps);
};