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 { 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";
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));
20 )(DialogProjectCreate);