🚽 Wiring up the flushDb call

This commit is contained in:
2021-12-01 14:37:29 -08:00
parent e197143498
commit edf49527a0
4 changed files with 50 additions and 5 deletions

View File

@@ -3,10 +3,12 @@ import {
SETTINGS_OBJECT_FETCHED,
SETTINGS_OBJECT_DELETED,
SETTINGS_CALL_IN_PROGRESS,
SETTINGS_DB_FLUSH_SUCCESS,
} from "../constants/action-types";
const initialState = {
data: {},
inProgress: false,
DbFlushed: false,
};
function settingsReducer(state = initialState, action) {
@@ -31,6 +33,14 @@ function settingsReducer(state = initialState, action) {
inProgress: false,
};
case SETTINGS_DB_FLUSH_SUCCESS:
console.log(state);
return {
...state,
DbFlushed: action.data,
inProgress: false,
};
default:
return { ...state };
}