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