17305: Added handling for non collection file size display
[arvados.git] / src / views-components / api-client-authorizations-dialog / remove-dialog.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4 import { Dispatch, compose } from 'redux';
5 import { connect } from "react-redux";
6 import { ConfirmationDialog } from "~/components/confirmation-dialog/confirmation-dialog";
7 import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
8 import { API_CLIENT_AUTHORIZATION_REMOVE_DIALOG, removeApiClientAuthorization } from '~/store/api-client-authorizations/api-client-authorizations-actions';
9
10 const mapDispatchToProps = (dispatch: Dispatch, props: WithDialogProps<any>) => ({
11     onConfirm: () => {
12         props.closeDialog();
13         dispatch<any>(removeApiClientAuthorization(props.data.uuid));
14     }
15 });
16
17 export const RemoveApiClientAuthorizationDialog = compose(
18     withDialog(API_CLIENT_AUTHORIZATION_REMOVE_DIALOG),
19     connect(null, mapDispatchToProps)
20 )(ConfirmationDialog);