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';
14 import { openApiClientAuthorizationsHelpDialog } from '~/store/api-client-authorizations/api-client-authorizations-actions';
16 const mapStateToProps = (state: RootState): ApiClientAuthorizationPanelRootDataProps => {
18 resources: state.resources
22 const mapDispatchToProps = (dispatch: Dispatch): ApiClientAuthorizationPanelRootActionProps => ({
23 onContextMenu: (event, apiClientAuthorization) => {
24 dispatch<any>(openApiClientAuthorizationContextMenu(event, apiClientAuthorization));
26 onItemClick: (resourceUuid: string) => { return; },
27 onItemDoubleClick: uuid => { return; },
28 openHelpDialog: () => {
29 dispatch<any>(openApiClientAuthorizationsHelpDialog());
33 export const ApiClientAuthorizationPanel = connect(mapStateToProps, mapDispatchToProps)(ApiClientAuthorizationPanelRoot);