Merge branch 'main' into 21720-material-ui-upgrade
[arvados.git] / services / workbench2 / src / views / api-client-authorization-panel / api-client-authorization-panel.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { RootState } from 'store/store';
6 import { Dispatch } from 'redux';
7 import { connect } from 'react-redux';
8 import {
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
15 const mapStateToProps = (state: RootState): ApiClientAuthorizationPanelRootDataProps => {
16     return {
17         resources: state.resources
18     };
19 };
20
21 const mapDispatchToProps = (dispatch: Dispatch): ApiClientAuthorizationPanelRootActionProps => ({
22     onContextMenu: (event, apiClientAuthorization) => {
23         dispatch<any>(openApiClientAuthorizationContextMenu(event, apiClientAuthorization));
24     },
25     onItemClick: (resourceUuid: string) => { return; },
26     onItemDoubleClick: uuid => { return; },
27 });
28
29 export const ApiClientAuthorizationPanel = connect(mapStateToProps, mapDispatchToProps)(ApiClientAuthorizationPanelRoot);