import { Dispatch } from "redux";
import { connect } from "react-redux";
import { navigateTo } from '~/store/navigation/navigation-action';
-import { SearchResultsPanelActionProps, SearchResultsPanelDataProps } from './search-results-panel-view';
-import { RootState } from '~/store/store';
+import { SearchResultsPanelActionProps } from './search-results-panel-view';
import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-menu/context-menu-actions';
import { ResourceKind } from '~/models/resource';
import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
import { SearchResultsPanelView } from '~/views/search-results-panel/search-results-panel-view';
+import { RootState } from '~/store/store';
-const mapStateToProps = (state: RootState): SearchResultsPanelDataProps => ({
- data: {
- inTrash: false,
- dataFrom: '',
- dataTo: '',
- saveQuery: false,
- searchQuery: ''
- }
-});
+const mapStateToProps = (rootState: RootState) => {
+ return {
+ user: rootState.auth.user,
+ sessions: rootState.auth.sessions,
+ remoteHostsConfig: rootState.auth.remoteHostsConfig
+ };
+};
const mapDispatchToProps = (dispatch: Dispatch): SearchResultsPanelActionProps => ({
onContextMenu: (event, resourceUuid) => {
menuKind: kind
}));
}
+ dispatch<any>(loadDetailsPanel(resourceUuid));
},
onDialogOpen: (ownerUuid: string) => { return; },
onItemClick: (resourceUuid: string) => {
}
});
-export const SearchResultsPanel = connect(mapStateToProps, mapDispatchToProps)(SearchResultsPanelView);
\ No newline at end of file
+export const SearchResultsPanel = connect(mapStateToProps, mapDispatchToProps)(SearchResultsPanelView);