aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/reducers
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-10 11:10:05 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-10 11:10:05 +0100
commit7bd3b6766536e33146bb55506c79619a1ab7d3b3 (patch)
treee5e53fa944d2c86143d1924b82de504c9dc76224 /src/client/react/reducers
parentb7fab958633456346d67c9cdd68eef05572882ab (diff)
Move reducers and actions into seperate folders
Diffstat (limited to 'src/client/react/reducers')
-rw-r--r--src/client/react/reducers/search.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/client/react/reducers/search.js b/src/client/react/reducers/search.js
new file mode 100644
index 0000000..05926c9
--- /dev/null
+++ b/src/client/react/reducers/search.js
@@ -0,0 +1,21 @@
+const DEFAULT_STATE = {
+ searchInput: '',
+ searchResults: [],
+};
+
+const search = (state = DEFAULT_STATE, action) => {
+ switch (action.type) {
+ case 'SEARCH/TYPE':
+ return {
+ ...state,
+ searchInput: action.typedValue,
+ searchResults: [
+ { type: 's', name: '18561' },
+ ],
+ };
+ default:
+ return state;
+ }
+};
+
+export default search;