} from '~/store/search-bar/search-bar-actions';
import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
} from '~/store/search-bar/search-bar-actions';
import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
return {
searchValue: searchBar.searchValue,
currentView: searchBar.currentView,
isPopoverOpen: searchBar.open,
searchResults: searchBar.searchResults,
return {
searchValue: searchBar.searchValue,
currentView: searchBar.currentView,
isPopoverOpen: searchBar.open,
searchResults: searchBar.searchResults,
};
};
const mapDispatchToProps = (dispatch: Dispatch) => ({
onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
onSetView: (currentView: string) => dispatch(goToView(currentView)),
};
};
const mapDispatchToProps = (dispatch: Dispatch) => ({
onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
onSetView: (currentView: string) => dispatch(goToView(currentView)),
saveRecentQuery: (query: string) => dispatch<any>(saveRecentQuery(query)),
loadRecentQueries: () => dispatch<any>(loadRecentQueries()),
saveQuery: (data: SearchBarAdvanceFormData) => dispatch<any>(saveQuery(data)),
deleteSavedQuery: (id: number) => dispatch<any>(deleteSavedQuery(id)),
saveRecentQuery: (query: string) => dispatch<any>(saveRecentQuery(query)),
loadRecentQueries: () => dispatch<any>(loadRecentQueries()),
saveQuery: (data: SearchBarAdvanceFormData) => dispatch<any>(saveQuery(data)),
deleteSavedQuery: (id: number) => dispatch<any>(deleteSavedQuery(id)),
- openSearchView: () => dispatch<any>(openSearchView())
+ openSearchView: () => dispatch<any>(openSearchView()),
+ navigateTo: (uuid: string) => dispatch<any>(navigateToItem(uuid)),
+ editSavedQuery: (data: SearchBarAdvanceFormData) => dispatch<any>(editSavedQuery(data)),
+ searchDataOnEnter: (searchValue: string) => dispatch<any>(searchDataOnEnter(searchValue))
});
export const SearchBar = connect(mapStateToProps, mapDispatchToProps)(SearchBarView);
\ No newline at end of file
});
export const SearchBar = connect(mapStateToProps, mapDispatchToProps)(SearchBarView);
\ No newline at end of file