🔌 UI for socket connection status

This commit is contained in:
2021-06-01 10:49:48 -07:00
parent 773491429a
commit 69f79c1ece
6 changed files with 48 additions and 43 deletions

View File

@@ -7,6 +7,7 @@ import {
const initialState = {
dataTransferred: false,
comicBookMetadata: [],
socketConnected: false,
};
function fileOpsReducer(state = initialState, action) {
@@ -17,6 +18,12 @@ function fileOpsReducer(state = initialState, action) {
comicBookMetadata: [...state.comicBookMetadata, action.data.data],
dataTransferred: true,
};
case IMS_SOCKET_CONNECTION_CONNECTED:
return {
...state,
socketConnected: action.socketConnected,
};
default:
return state;
}