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';
9 ApiClientAuthorizationPanelRoot,
10 ApiClientAuthorizationPanelRootDataProps,
11 ApiClientAuthorizationPanelRootActionProps
12 } from 'views/api-client-authorization-panel/api-client-authorization-panel-root';
13 import { openApiClientAuthorizationContextMenu } from 'store/context-menu/context-menu-actions';
15 const mapStateToProps = (state: RootState): ApiClientAuthorizationPanelRootDataProps => {
17 resources: state.resources
21 const mapDispatchToProps = (dispatch: Dispatch): ApiClientAuthorizationPanelRootActionProps => ({
22 onContextMenu: (event, apiClientAuthorization) => {
23 dispatch<any>(openApiClientAuthorizationContextMenu(event, apiClientAuthorization));
25 onItemClick: (resourceUuid: string) => { return; },
26 onItemDoubleClick: uuid => { return; },
29 export const ApiClientAuthorizationPanel = connect(mapStateToProps, mapDispatchToProps)(ApiClientAuthorizationPanelRoot);