X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/25aa8a7c81609525d300f38bc5b7d2344c4e1cdf..c3bec339e0f247f7cbc8698120b8ecf43629d3e7:/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx

diff --git a/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx b/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
index 53464022b7..fb5f094b68 100644
--- a/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
+++ b/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
@@ -2,29 +2,28 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Dispatch, compose } from "redux";
+import { Dispatch } from "redux";
 import { reduxForm, reset, startSubmit, stopSubmit } from "redux-form";
 import { withDialog } from "~/store/dialog/with-dialog";
 import { dialogActions } from "~/store/dialog/dialog-actions";
 import { DialogCollectionCreateWithSelected } from "../dialog-create/dialog-collection-create-selected";
-import { loadProjectTreePickerProjects } from "../project-tree-picker/project-tree-picker";
+import { resetPickerProjectTree } from "~/store/project-tree-picker/project-tree-picker-actions";
 
 export const DIALOG_COLLECTION_CREATE_WITH_SELECTED = 'dialogCollectionCreateWithSelected';
 
 export const createCollectionWithSelected = () =>
     (dispatch: Dispatch) => {
         dispatch(reset(DIALOG_COLLECTION_CREATE_WITH_SELECTED));
-        dispatch<any>(loadProjectTreePickerProjects(''));
+        dispatch<any>(resetPickerProjectTree());
         dispatch(dialogActions.OPEN_DIALOG({ id: DIALOG_COLLECTION_CREATE_WITH_SELECTED, data: {} }));
     };
 
-
-export const DialogCollectionCreateWithSelectedFile = compose(
-    withDialog(DIALOG_COLLECTION_CREATE_WITH_SELECTED),
-    reduxForm({
+export const [DialogCollectionCreateWithSelectedFile] = [DialogCollectionCreateWithSelected]
+    .map(withDialog(DIALOG_COLLECTION_CREATE_WITH_SELECTED))
+    .map(reduxForm({
         form: DIALOG_COLLECTION_CREATE_WITH_SELECTED,
         onSubmit: (data, dispatch) => {
             dispatch(startSubmit(DIALOG_COLLECTION_CREATE_WITH_SELECTED));
             setTimeout(() => dispatch(stopSubmit(DIALOG_COLLECTION_CREATE_WITH_SELECTED, { name: 'Invalid name' })), 2000);
         }
-    }))(DialogCollectionCreateWithSelected);
+    }));
