fixed conflicts + link to ssh-keys panel
[arvados-workbench2.git] / src / views-components / dialog-forms / create-ssh-key-dialog.ts
diff --git a/src/views-components/dialog-forms/create-ssh-key-dialog.ts b/src/views-components/dialog-forms/create-ssh-key-dialog.ts
new file mode 100644 (file)
index 0000000..e965243
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { compose } from "redux";
+import { reduxForm } from 'redux-form';
+import { withDialog } from "~/store/dialog/with-dialog";
+import { SSH_KEY_CREATE_FORM_NAME, createSshKey, SshKeyCreateFormDialogData } from '~/store/auth/auth-action';
+import { DialogSshKeyCreate } from '~/views-components/dialog-create/dialog-ssh-key-create';
+
+export const CreateSshKeyDialog = compose(
+    withDialog(SSH_KEY_CREATE_FORM_NAME),
+    reduxForm<SshKeyCreateFormDialogData>({
+        form: SSH_KEY_CREATE_FORM_NAME,
+        onSubmit: (data, dispatch) => {
+            dispatch(createSshKey(data));
+        }
+    })
+)(DialogSshKeyCreate);
\ No newline at end of file