Merge branch '22316-test-fixes'
[arvados.git] / services / workbench2 / src / views-components / dialog-forms / create-repository-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 { createRepository, REPOSITORY_CREATE_FORM_NAME } from "store/repositories/repositories-actions";
9 import { DialogRepositoryCreate } from "views-components/dialog-create/dialog-repository-create";
10
11 export const CreateRepositoryDialog = compose(
12     withDialog(REPOSITORY_CREATE_FORM_NAME),
13     reduxForm<any>({
14         form: REPOSITORY_CREATE_FORM_NAME,
15         onSubmit: (repositoryName, dispatch) => {
16             dispatch(createRepository(repositoryName));
17         }
18     })
19 )(DialogRepositoryCreate);