From f1e1967ba28a81ff43b7229dbee27dd5e0ba6c13 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Mon, 30 May 2022 13:06:21 -0300 Subject: [PATCH] 18787: Removes unnecessary action. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/store/collection-panel/collection-panel-action.ts | 3 +-- src/store/collection-panel/collection-panel-reducer.ts | 1 - src/store/collections/collection-update-actions.ts | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/collection-panel/collection-panel-action.ts b/src/store/collection-panel/collection-panel-action.ts index 55eb5949..890a7441 100644 --- a/src/store/collection-panel/collection-panel-action.ts +++ b/src/store/collection-panel/collection-panel-action.ts @@ -15,7 +15,6 @@ import { loadDetailsPanel } from 'store/details-panel/details-panel-action'; export const collectionPanelActions = unionize({ SET_COLLECTION: ofType(), - LOAD_COLLECTION_SUCCESS: ofType<{ item: CollectionResource }>(), }); export type CollectionPanelAction = UnionOf; @@ -27,7 +26,7 @@ export const loadCollectionPanel = (uuid: string, forceReload = false) => ? item : await services.collectionService.get(uuid); dispatch(loadDetailsPanel(collection.uuid)); - dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: collection })); + dispatch(collectionPanelActions.SET_COLLECTION(collection)); dispatch(resourcesActions.SET_RESOURCES([collection])); return collection; }; diff --git a/src/store/collection-panel/collection-panel-reducer.ts b/src/store/collection-panel/collection-panel-reducer.ts index b9713f5d..6afba66c 100644 --- a/src/store/collection-panel/collection-panel-reducer.ts +++ b/src/store/collection-panel/collection-panel-reducer.ts @@ -20,5 +20,4 @@ export const collectionPanelReducer = (state: CollectionPanelState = initialStat ...state, item, }), - LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }), }); diff --git a/src/store/collections/collection-update-actions.ts b/src/store/collections/collection-update-actions.ts index 82418d27..bf9c6449 100644 --- a/src/store/collections/collection-update-actions.ts +++ b/src/store/collections/collection-update-actions.ts @@ -55,7 +55,7 @@ export const updateCollection = (collection: CollectionUpdateFormDialogData) => properties: collection.properties } ).then(updatedCollection => { updatedCollection = {...cachedCollection, ...updatedCollection}; - dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: updatedCollection as CollectionResource })); + dispatch(collectionPanelActions.SET_COLLECTION(updatedCollection)); dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_UPDATE_FORM_NAME })); dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPDATE_FORM_NAME)); dispatch(snackbarActions.OPEN_SNACKBAR({ -- 2.30.2