mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-24 16:49:48 +00:00
21 lines
793 B
TypeScript
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);
|
|
};
|