🏗 Wiring up the AirDCPP settings call

This commit is contained in:
2021-11-14 21:43:47 -08:00
parent ced3457ea2
commit 305c172be7
10 changed files with 87 additions and 15 deletions

View File

@@ -0,0 +1,30 @@
import {
SETTINGS_CALL_FAILED,
SETTINGS_OBJECT_FETCHED,
SETTINGS_CALL_IN_PROGRESS,
} from "../constants/action-types";
const initialState = {
settings: {},
inProgress: false,
};
function settingsReducer(state = initialState, action) {
switch (action.type) {
case SETTINGS_CALL_IN_PROGRESS:
return {
...state,
inProgress: true,
};
case SETTINGS_OBJECT_FETCHED:
return {
...state,
data: action.data,
};
default:
return { ...state };
}
}
export default settingsReducer;