Merge branch 'master' into 14491-graph-field-is-too-big-when-no-workflows-were-chosen
[arvados-workbench2.git] / src / store / progress-indicator / with-progress.ts
index b91c05df25a582b2d2422724f508115fee68dfd3..24f7e3272e34a540fc40d0050109da5dd1408cb3 100644 (file)
@@ -7,7 +7,7 @@ import { connect } from 'react-redux';
 import { RootState } from '~/store/store';
 
 export type WithProgressStateProps = {
-    started: boolean;
+    working: boolean;
 };
 
 export const withProgress = (id: string) =>
@@ -15,6 +15,6 @@ export const withProgress = (id: string) =>
         connect(mapStateToProps(id))(component);
 
 export const mapStateToProps = (id: string) => (state: RootState): WithProgressStateProps => {
-    const progress = state.progressIndicator[id];
-    return progress;
-};
\ No newline at end of file
+    const progress = state.progressIndicator.find(p => p.id === id);
+    return { working: progress ? progress.working : false };
+};