aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/reducers/search.js
blob: 08be519a34779d415e359530bfafba19b102fab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const DEFAULT_STATE = {
  searchInput: '',
  searchResults: [],
};

const search = (state = DEFAULT_STATE, action) => {
  switch (action.type) {
    case 'SEARCH/INPUT_CHANGE':
      return {
        ...state,
        searchInput: action.typedValue,
        searchResults: [
          { type: 's', name: '18561' },
        ],
      };
    default:
      return state;
  }
};

export default search;