WIP General Search.

This commit is contained in:
elforjani3
2020-04-13 21:30:26 +02:00
9 changed files with 99 additions and 86 deletions

View File

@@ -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);