1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { RootState } from '~/store/store';
6 import { Dispatch } from 'redux';
7 import { connect } from 'react-redux';
8 import { } from '~/store/keep-services/keep-services-actions';
11 KeepServicePanelRootDataProps,
12 KeepServicePanelRootActionProps
13 } from '~/views/keep-service-panel/keep-service-panel-root';
14 import { openKeepServiceContextMenu } from '~/store/context-menu/context-menu-actions';
16 const mapStateToProps = (state: RootState): KeepServicePanelRootDataProps => {
18 keepServices: state.keepServices,
19 hasKeepSerices: state.keepServices.length > 0
23 const mapDispatchToProps = (dispatch: Dispatch): KeepServicePanelRootActionProps => ({
24 openRowOptions: (event, index, keepService) => {
25 dispatch<any>(openKeepServiceContextMenu(event, index, keepService));
29 export const KeepServicePanel = connect(mapStateToProps, mapDispatchToProps)(KeepServicePanelRoot);