X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/47440ead99a61a13bc635630e0f4b07d9322edbf..e51530db62c369733186003cc5f005e491f29373:/src/views-components/search-bar/search-bar.tsx

diff --git a/src/views-components/search-bar/search-bar.tsx b/src/views-components/search-bar/search-bar.tsx
index 3315c147..98440fda 100644
--- a/src/views-components/search-bar/search-bar.tsx
+++ b/src/views-components/search-bar/search-bar.tsx
@@ -7,11 +7,11 @@ import { RootState } from '~/store/store';
 import { Dispatch } from 'redux';
 import { goToView, searchData, 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 {
-        // ToDo: add value to store
-        value: '',
+        searchValue: searchBar.searchValue,
         currentView: searchBar.currentView,
         open: searchBar.open,
         searchResults: searchBar.searchResults
@@ -22,7 +22,9 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
     onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
     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
