💽 Raw import to mongo WIP

This commit is contained in:
2021-06-02 09:02:07 -07:00
parent 69f79c1ece
commit 9d27a9dd95
10 changed files with 16397 additions and 10 deletions

View File

@@ -3,11 +3,13 @@ import {
IMS_SOCKET_CONNECTION_DISCONNECTED,
IMS_SOCKET_DATA_FETCHED,
IMS_SOCKET_ERROR,
IMS_RAW_IMPORT_SUCCESSFUL,
} from "../constants/action-types";
const initialState = {
dataTransferred: false,
comicBookMetadata: [],
socketConnected: false,
rawImportCompleted: {},
};
function fileOpsReducer(state = initialState, action) {
@@ -15,7 +17,7 @@ function fileOpsReducer(state = initialState, action) {
case IMS_SOCKET_DATA_FETCHED:
return {
...state,
comicBookMetadata: [...state.comicBookMetadata, action.data.data],
comicBookMetadata: [...state.comicBookMetadata, action.data],
dataTransferred: true,
};
@@ -24,6 +26,11 @@ function fileOpsReducer(state = initialState, action) {
...state,
socketConnected: action.socketConnected,
};
case IMS_RAW_IMPORT_SUCCESSFUL:
return {
...state,
rawImportCompleted: action.rawImportCompleted,
};
default:
return state;
}