diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:01:36 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:01:36 +0100 |
commit | 4ce420528dd747021f7fa51483710388f5733724 (patch) | |
tree | ed01c295124b07fdbfbce70463af9dd400ab1125 /src/client/react/reducers.js | |
parent | 0141d1f9f4c7ca1755e0a5da908e9d27cf7aa0e1 (diff) |
Add Search container
Diffstat (limited to 'src/client/react/reducers.js')
-rw-r--r-- | src/client/react/reducers.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/react/reducers.js b/src/client/react/reducers.js index 1afcec5..3fb884b 100644 --- a/src/client/react/reducers.js +++ b/src/client/react/reducers.js @@ -1,5 +1,18 @@ -const reducer = (state = [], action) => { +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; } |