Files
bigcapital/packages/webapp/src/containers/Purchases/PaymentsMade/PaymentsLanding/withPaymentMade.tsx
2026-01-01 21:58:42 +02:00

21 lines
706 B
TypeScript

// @ts-nocheck
import { connect } from 'react-redux';
import {
getPaymentMadesTableStateFactory,
paymentsTableStateChangedFactory,
} from '@/store/PaymentMades/paymentMades.selector';
export const withPaymentMade = (mapState) => {
const getPaymentMadesTableState = getPaymentMadesTableStateFactory();
const paymentsTableStateChanged = paymentsTableStateChangedFactory();
const mapStateToProps = (state, props) => {
const mapped = {
paymentMadesTableState: getPaymentMadesTableState(state, props),
paymentsTableStateChanged: paymentsTableStateChanged(state, props),
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};