aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/reducers/eventLog.js
blob: 9d078c140bb3455a329a4e1a9294c5f11b5bce04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import {combineReducers} from 'redux'
import {TOGGLE_EVENTLOG_FILTER} from "../reduxActions"

const defaultVisibility = {
    "debug": false,
    "info": true,
    "web": true
};

const visibilityFilter = (state = defaultVisibility, action) => {
    switch (action.type) {
        case TOGGLE_EVENTLOG_FILTER:
            return {
                ...state,
                [action.filter]: !state[action.filter]
            };
        default:
            return state;
    }
};

const entries = (state = [], action) => {
    return state;
};

const eventLog = combineReducers({
    visibilityFilter,
    entries
});

export default eventLog