diff options
Diffstat (limited to 'src/content/reducers/setting.ts')
-rw-r--r-- | src/content/reducers/setting.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/content/reducers/setting.ts b/src/content/reducers/setting.ts new file mode 100644 index 0000000..a49db6d --- /dev/null +++ b/src/content/reducers/setting.ts @@ -0,0 +1,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 { ...action.value }; + default: + return state; + } +} + |