Merge branch 'origin/master' into 14478-log-in-into-clusters
[arvados-workbench2.git] / src / views-components / dialog-forms / create-ssh-key-dialog.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { compose } from "redux";
6 import { reduxForm } from 'redux-form';
7 import { withDialog } from "~/store/dialog/with-dialog";
8 import {
9     SSH_KEY_CREATE_FORM_NAME,
10     createSshKey,
11     SshKeyCreateFormDialogData
12 } from '~/store/auth/auth-action-ssh';
13 import { DialogSshKeyCreate } from '~/views-components/dialog-create/dialog-ssh-key-create';
14
15 export const CreateSshKeyDialog = compose(
16     withDialog(SSH_KEY_CREATE_FORM_NAME),
17     reduxForm<SshKeyCreateFormDialogData>({
18         form: SSH_KEY_CREATE_FORM_NAME,
19         onSubmit: (data, dispatch) => {
20             dispatch(createSshKey(data));
21         }
22     })
23 )(DialogSshKeyCreate);