aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/find.js
blob: 8d63ee536391505d10c992df1d08ade209e1a102 (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: null,
  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;
  }
}