Add ssh keys panel
[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 { SSH_KEY_CREATE_FORM_NAME, createSshKey } from '~/store/auth/auth-action';
9 import { DialogSshKeyCreate } from '~/views-components/dialog-create/dialog-ssh-key-create';
10 import { SshKeyCreateFormDialogData } from '~/models/ssh-key';
11
12 export const CreateSshKeyDialog = compose(
13     withDialog(SSH_KEY_CREATE_FORM_NAME),
14     reduxForm<SshKeyCreateFormDialogData>({
15         form: SSH_KEY_CREATE_FORM_NAME,
16         onSubmit: (data, dispatch) => {
17             dispatch(createSshKey(data));
18         }
19     })
20 )(DialogSshKeyCreate);