mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
24 lines
838 B
TypeScript
24 lines
838 B
TypeScript
// @ts-nocheck
|
|
import { connect } from 'react-redux';
|
|
import {
|
|
getEstimatesTableStateFactory,
|
|
isEstimatesTableStateChangedFactory,
|
|
getEstimatesSelectedRowsFactory,
|
|
} from '@/store/Estimate/estimates.selectors';
|
|
|
|
export default (mapState) => {
|
|
const getEstimatesTableState = getEstimatesTableStateFactory();
|
|
const getSelectedRows = getEstimatesSelectedRowsFactory();
|
|
const isEstimatesTableStateChanged = isEstimatesTableStateChangedFactory();
|
|
|
|
const mapStateToProps = (state, props) => {
|
|
const mapped = {
|
|
estimatesTableState: getEstimatesTableState(state, props),
|
|
estimatesTableStateChanged: isEstimatesTableStateChanged(state, props),
|
|
estimatesSelectedRows: getSelectedRows(state, props),
|
|
};
|
|
return mapState ? mapState(mapped, state, props) : mapped;
|
|
};
|
|
return connect(mapStateToProps);
|
|
};
|