1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-06 19:25:17 +02:00

Add and update custom queries

This commit is contained in:
unknown 2021-10-11 13:55:53 +02:00
parent a885440fef
commit 38ffdf1bff
8 changed files with 159 additions and 25 deletions

View file

@ -48,6 +48,13 @@ const deleteQuery = (state: State, action: Action): State => {
};
};
const updateQuery = (state: State, action: Action): State => {
return {
...state,
customQueries: action.payload,
};
};
const configReducer = (state: State = initialState, action: Action) => {
switch (action.type) {
case ActionTypes.getConfig:
@ -60,6 +67,8 @@ const configReducer = (state: State = initialState, action: Action) => {
return addQuery(state, action);
case ActionTypes.deleteQuery:
return deleteQuery(state, action);
case ActionTypes.updateQuery:
return updateQuery(state, action);
default:
return state;
}