aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/find.js
blob: eb43c370f1e2fada8ccb0d789a017191f188c44d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
  }
}