aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/find.ts
blob: 4560e2c7d2dee18db6a7f0272f395c42f44397e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 { ...state,
      keyword: action.keyword,
      found: action.found, };
  default:
    return state;
  }
}