aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/reducers.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/reducers.js')
-rw-r--r--src/client/react/reducers.js15
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;
}