🔬 Wiring up the image analysis UI with the endpoint

This commit is contained in:
2022-02-08 14:48:24 -08:00
parent 8fdd8d0226
commit 9ff048d541
13 changed files with 214 additions and 85 deletions

View File

@@ -17,9 +17,13 @@ import {
LS_IMPORT,
LS_COVER_EXTRACTED,
LS_COMIC_ADDED,
IMG_ANALYSIS_CALL_IN_PROGRESS,
IMG_ANALYSIS_DATA_FETCH_SUCCESS,
} from "../constants/action-types";
const initialState = {
IMSCallInProgress: false,
IMGCallInProgress: false,
imageAnalysisResults: {},
comicBookExtractionInProgress: false,
comicBookMetadata: [],
comicVolumeGroups: [],
@@ -135,6 +139,18 @@ function fileOpsReducer(state = initialState, action) {
...state,
};
}
case IMG_ANALYSIS_CALL_IN_PROGRESS: {
return {
...state,
IMGCallInProgress: true,
};
}
case IMG_ANALYSIS_DATA_FETCH_SUCCESS: {
return {
...state,
imageAnalysisResults: action.result,
};
}
default:
return state;
}