Merge branch 'origin/master' into 14280-query-language
[arvados.git] / src / views-components / dialog-forms / create-project-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 { PROJECT_CREATE_FORM_NAME, ProjectCreateFormDialogData } from '~/store/projects/project-create-actions';
9 import { DialogProjectCreate } from '~/views-components/dialog-create/dialog-project-create';
10 import { createProject } from "~/store/workbench/workbench-actions";
11
12 export const CreateProjectDialog = compose(
13     withDialog(PROJECT_CREATE_FORM_NAME),
14     reduxForm<ProjectCreateFormDialogData>({
15         form: PROJECT_CREATE_FORM_NAME,
16         onSubmit: (data, dispatch) => {
17             dispatch(createProject(data));
18         }
19     })
20 )(DialogProjectCreate);