From 4ce420528dd747021f7fa51483710388f5733724 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sun, 10 Dec 2017 01:01:36 +0100 Subject: Add Search container --- src/client/react/reducers.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/client/react/reducers.js') 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; } -- cgit v1.1