aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/reducers/eventLog.js
blob: 169cd30690cc341291b33a03f12135a3d53fb990 (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
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 Object.assign({}, state, {
                [action.filter]: !state[action.filter]
            });
        default:
            return state;
    }
};

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

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

export default eventLog