tests fix
[arvados.git] / src / views-components / search-bar / search-bar.tsx
index affd5e4c69b16dc488b0f18a98430fdda405a723..e9ebc7c73503d6aad46ecd21e32d1aac442da65a 100644 (file)
@@ -7,6 +7,7 @@ import { RootState } from '~/store/store';
 import { Dispatch } from 'redux';
 import { goToView, searchBarActions } from '~/store/search-bar/search-bar-actions';
 import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
+import { saveRecentQuery, loadRecentQueries } from '~/store/search-bar/search-bar-actions';
 
 const mapStateToProps = ({ searchBar }: RootState) => {
     return {
@@ -18,7 +19,9 @@ const mapStateToProps = ({ searchBar }: RootState) => {
 const mapDispatchToProps = (dispatch: Dispatch) => ({
     onSetView: (currentView: string) => dispatch(goToView(currentView)),
     openView: () => dispatch<any>(searchBarActions.OPEN_SEARCH_VIEW()),
-    closeView: () => dispatch<any>(searchBarActions.CLOSE_SEARCH_VIEW())
+    closeView: () => dispatch<any>(searchBarActions.CLOSE_SEARCH_VIEW()),
+    saveQuery: (query: string) => dispatch<any>(saveRecentQuery(query)),
+    loadQueries: () => dispatch<any>(loadRecentQueries())
 });
 
 export const SearchBar = connect(mapStateToProps, mapDispatchToProps)(SearchBarView);
\ No newline at end of file