+ }
+ } catch (e) {
+ dispatch(snackbarActions.OPEN_SNACKBAR({
+ message: "Could not move collection to trash",
+ kind: SnackbarKind.ERROR
+ }));
+ }
+ };
+
+export const toggleTrashed = (kind: ResourceKind, uuid: string, ownerUuid: string, isTrashed: boolean) =>
+ (dispatch: Dispatch) => {
+ if (kind === ResourceKind.PROJECT) {
+ dispatch<any>(toggleProjectTrashed(uuid, ownerUuid, isTrashed!!));
+ } else if (kind === ResourceKind.COLLECTION) {
+ dispatch<any>(toggleCollectionTrashed(uuid, isTrashed!!));