mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
WIP General Search.
This commit is contained in:
@@ -3,11 +3,19 @@ import t from 'store/types';
|
||||
import { generalSearch } from 'store/search/search.actions';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
resultSearch: state.GeneralSearch,
|
||||
resultSearch: state.globalSearch.searches,
|
||||
globalSearchShow: state.globalSearch.isOpen,
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
generalSearch: (result) => dispatch(generalSearch(result)),
|
||||
openGlobalSearch: (result) =>
|
||||
dispatch({
|
||||
type: t.OPEN_SEARCH,
|
||||
}),
|
||||
closeGlobalSearch: (result) =>
|
||||
dispatch({
|
||||
type: t.CLOSE_SEARCH,
|
||||
}),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
Reference in New Issue
Block a user