mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
20 lines
564 B
TypeScript
20 lines
564 B
TypeScript
// @ts-nocheck
|
|
import { connect } from 'react-redux';
|
|
|
|
export default (mapState) => {
|
|
const mapStateToProps = (state, props) => {
|
|
const { globalSearch } = state;
|
|
|
|
const mapped = {
|
|
globalSearchShow: globalSearch.isOpen,
|
|
defaultUniversalResourceType: globalSearch.defaultResourceType,
|
|
|
|
searchSelectedResourceType: globalSearch.selectedItem.resourceType,
|
|
searchSelectedResourceId: globalSearch.selectedItem.resourceId,
|
|
};
|
|
return mapState ? mapState(mapped, state, props) : mapped;
|
|
};
|
|
|
|
return connect(mapStateToProps);
|
|
};
|