17526: Rename webdav dialong to Access with 3rd party client
[arvados-workbench2.git] / src / store / progress-indicator / with-progress.ts
index b91c05df25a582b2d2422724f508115fee68dfd3..2d089fce66ebc6577e8b72aa43fa291083e4321c 100644 (file)
@@ -2,12 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { connect } from 'react-redux';
-import { RootState } from '~/store/store';
+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 };
+};