mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
14 lines
355 B
JavaScript
14 lines
355 B
JavaScript
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);
|
|
};
|