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';
10 KeepServicePanelRootDataProps,
11 KeepServicePanelRootActionProps
12 } from 'views/keep-service-panel/keep-service-panel-root';
13 import { openKeepServiceContextMenu } from 'store/context-menu/context-menu-actions';
15 const mapStateToProps = (state: RootState): KeepServicePanelRootDataProps => {
17 keepServices: state.keepServices,
18 hasKeepSerices: state.keepServices.length > 0
22 const mapDispatchToProps = (dispatch: Dispatch): KeepServicePanelRootActionProps => ({
23 openRowOptions: (event, keepService) => {
24 dispatch<any>(openKeepServiceContextMenu(event, keepService));
28 export const KeepServicePanel = connect(mapStateToProps, mapDispatchToProps)(KeepServicePanelRoot);