From: Lucas Di Pentima Date: Mon, 30 May 2022 16:06:21 +0000 (-0300) Subject: 18787: Removes unnecessary action. X-Git-Tag: 2.5.0~54^2~4 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/f1e1967ba28a81ff43b7229dbee27dd5e0ba6c13 18787: Removes unnecessary action. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- 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({