diff options
Diffstat (limited to 'src/background/reducers/find.js')
-rw-r--r-- | src/background/reducers/find.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/background/reducers/find.js b/src/background/reducers/find.js new file mode 100644 index 0000000..4ded801 --- /dev/null +++ b/src/background/reducers/find.js @@ -0,0 +1,16 @@ +import actions from 'content/actions'; + +const defaultState = { + keyword: null, +}; + +export default function reducer(state = defaultState, action = {}) { + switch (action.type) { + case actions.FIND_SET_KEYWORD: + return Object.assign({}, state, { + keyword: action.keyword, + }); + default: + return state; + } +} |