X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6271a0f335b359cde84a04dbf4d4f07f63ca7fc6..72a8bf2138429b61dfc9710cc41932396b6f5b4f:/src/store/trash/trash-actions.ts?ds=sidebyside diff --git a/src/store/trash/trash-actions.ts b/src/store/trash/trash-actions.ts index e999719d..ffdad04a 100644 --- a/src/store/trash/trash-actions.ts +++ b/src/store/trash/trash-actions.ts @@ -27,11 +27,18 @@ export const toggleProjectTrashed = dispatch(activateSidePanelTreeItem(uuid)); } else { errorMessage = "Could not move project to trash"; - successMessage = "Added to trash"; + successMessage = "Added project to trash"; await services.groupsService.trash(uuid); dispatch(loadSidePanelTreeProjects(ownerUuid)); dispatch(navigateTo(ownerUuid)); } + dispatch( + snackbarActions.OPEN_SNACKBAR({ + message: successMessage, + hideDuration: 2000, + kind: SnackbarKind.SUCCESS, + }) + ); } catch (e) { dispatch( snackbarActions.OPEN_SNACKBAR({ @@ -40,13 +47,6 @@ export const toggleProjectTrashed = }) ); } - dispatch( - snackbarActions.OPEN_SNACKBAR({ - message: successMessage, - hideDuration: 2000, - kind: SnackbarKind.SUCCESS, - }) - ); }; export const toggleCollectionTrashed =