about summary refs log tree commit diff
path: root/app/assets/javascripts/components/selectors
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-30 15:06:43 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-10-30 15:06:43 +0100
commite8ff4c8e56650bf061c63a7da3d84b742e618b6a (patch)
treecb9aa48393bc6108655db7490434ae29d3145ee5 /app/assets/javascripts/components/selectors
parent7060bdf04bde59aab9addce95f00d6e1075a62ba (diff)
Refactoring redux state into different reducers
Diffstat (limited to 'app/assets/javascripts/components/selectors')
-rw-r--r--app/assets/javascripts/components/selectors/index.jsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/selectors/index.jsx b/app/assets/javascripts/components/selectors/index.jsx
index 2bbbd3f70..33b179cb8 100644
--- a/app/assets/javascripts/components/selectors/index.jsx
+++ b/app/assets/javascripts/components/selectors/index.jsx
@@ -1,11 +1,11 @@
 import { createSelector } from 'reselect'
 import Immutable          from 'immutable';
 
-const getStatuses = state => state.getIn(['timelines', 'statuses']);
-const getAccounts = state => state.getIn(['timelines', 'accounts']);
+const getStatuses = state => state.get('statuses');
+const getAccounts = state => state.get('accounts');
 
-const getAccountBase         = (state, id) => state.getIn(['timelines', 'accounts', id], null);
-const getAccountRelationship = (state, id) => state.getIn(['timelines', 'relationships', id]);
+const getAccountBase         = (state, id) => state.getIn(['accounts', id], null);
+const getAccountRelationship = (state, id) => state.getIn(['relationships', id]);
 
 export const makeGetAccount = () => {
   return createSelector([getAccountBase, getAccountRelationship], (base, relationship) => {
@@ -17,7 +17,7 @@ export const makeGetAccount = () => {
   });
 };
 
-const getStatusBase = (state, id) => state.getIn(['timelines', 'statuses', id], null);
+const getStatusBase = (state, id) => state.getIn(['statuses', id], null);
 
 export const makeGetStatus = () => {
   return createSelector([getStatusBase, getStatuses, getAccounts], (base, statuses, accounts) => {