Files
bigcapital/packages/webapp/src/containers/WarehouseTransfers/WarehouseTransfersLanding/withWarehouseTransfers.tsx
2026-01-01 21:58:42 +02:00

21 lines
793 B
TypeScript

// @ts-nocheck
import { connect } from 'react-redux';
import {
getWarehouseTransfersTableStateFactory,
isWarehouseTransferTableStateChangedFactory,
} from '@/store/WarehouseTransfer/warehouseTransfer.selector';
export const withWarehouseTransfers = (mapState) => {
const getWarehouseTransferTableState = getWarehouseTransfersTableStateFactory();
const isWarehouseTransferTableChanged = isWarehouseTransferTableStateChangedFactory();
const mapStateToProps = (state, props) => {
const mapped = {
warehouseTransferTableState: getWarehouseTransferTableState(state, props),
warehouseTransferTableStateChanged: isWarehouseTransferTableChanged(state, props),
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};