Files
bigcapital/src/containers/Vendors/withVendorDetail.js
2021-09-21 17:13:53 +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);
};