aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/setting.js
blob: a23027f5c924a94548a6721240e1d1deb743344b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import actions from 'content/actions';

const defaultState = {
  // keymaps is and arrays of key-binding pairs, which is entries of Map
  keymaps: [],
};

export default function reducer(state = defaultState, action = {}) {
  switch (action.type) {
  case actions.SETTING_SET:
    return Object.assign({}, action.value);
  default:
    return state;
  }
}