about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/trends.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/reducers/trends.js')
-rw-r--r--app/javascript/mastodon/reducers/trends.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/trends.js b/app/javascript/mastodon/reducers/trends.js
new file mode 100644
index 000000000..95cf8f284
--- /dev/null
+++ b/app/javascript/mastodon/reducers/trends.js
@@ -0,0 +1,13 @@
+import { TRENDS_FETCH_SUCCESS } from '../actions/trends';
+import { fromJS } from 'immutable';
+
+const initialState = null;
+
+export default function trendsReducer(state = initialState, action) {
+  switch(action.type) {
+  case TRENDS_FETCH_SUCCESS:
+    return fromJS(action.trends);
+  default:
+    return state;
+  }
+};