1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
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';
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));
20 )(DialogSshKeyCreate);