1 // Copyright (C) The Arvados Authors. All rights reserved.
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 { SSH_KEY_REMOVE_DIALOG, removeSshKey } from '~/store/auth/auth-action-ssh';
10 const mapDispatchToProps = (dispatch: Dispatch, props: WithDialogProps<any>) => ({
13 dispatch<any>(removeSshKey(props.data.uuid));
17 export const RemoveSshKeyDialog = compose(
18 withDialog(SSH_KEY_REMOVE_DIALOG),
19 connect(null, mapDispatchToProps)
20 )(ConfirmationDialog);