diff options
Diffstat (limited to 'src/content/reducers/addon.ts')
-rw-r--r-- | src/content/reducers/addon.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/content/reducers/addon.ts b/src/content/reducers/addon.ts new file mode 100644 index 0000000..0def55a --- /dev/null +++ b/src/content/reducers/addon.ts @@ -0,0 +1,15 @@ +import actions from 'content/actions'; + +const defaultState = { + enabled: true, +}; + +export default function reducer(state = defaultState, action = {}) { + switch (action.type) { + case actions.ADDON_SET_ENABLED: + return { ...state, + enabled: action.enabled, }; + default: + return state; + } +} |