mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
re-structure to monorepo.
This commit is contained in:
14
packages/webapp/src/containers/Items/withItem.tsx
Normal file
14
packages/webapp/src/containers/Items/withItem.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
// @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);
|
||||
};
|
||||
Reference in New Issue
Block a user