Files
bigcapital/packages/webapp/src/containers/Items/withItem.tsx
2023-02-03 01:02:31 +02:00

15 lines
372 B
TypeScript

// @ts-nocheck
import { connect } from 'react-redux';
import { getItemById } from '@/store/items/items.reducer';
export default (mapState) => {
const mapStateToProps = (state, props) => {
const mapped = {
item: getItemById(state, props.itemId),
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};