X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a2bf1ed3a15cf55e426c51ad8e6febd7ff2e3020..2f0ac8c05c27a6cb41afe90d40a35a0195a8f885:/src/store/progress-indicator/progress-indicator-reducer.ts diff --git a/src/store/progress-indicator/progress-indicator-reducer.ts b/src/store/progress-indicator/progress-indicator-reducer.ts index 849906b5..89885afb 100644 --- a/src/store/progress-indicator/progress-indicator-reducer.ts +++ b/src/store/progress-indicator/progress-indicator-reducer.ts @@ -27,3 +27,7 @@ export const progressIndicatorReducer = (state: ProgressIndicatorState = initial export function isSystemWorking(state: ProgressIndicatorState): boolean { return state.length > 0 && state.reduce((working, p) => working ? true : p.working, false); } + +export const getProgressIndicator = (id: string) => + (state: ProgressIndicatorState) => + state.find(state => state.id === id);