aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/reducers.js
blob: 3fb884be570ee637182a0c72c4c95789a9e18196 (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 reducer = (state = DEFAULT_STATE, action) => {
  switch (action.type) {
    case 'TYPE':
      return {
        ...state,
        searchInput: action.typedValue,
        searchResults: [
          { type: 's', name: '18561' },
        ],
      };
    default:
      return state;
  }
};

export default reducer;