From 1c84d505c8cb926710d059725c5a2d966dd4736b Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Thu, 27 Oct 2016 21:59:56 +0200
Subject: Adding following/followers lists to the UI

---
 app/assets/javascripts/components/selectors/index.jsx | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

(limited to 'app/assets/javascripts/components/selectors/index.jsx')

diff --git a/app/assets/javascripts/components/selectors/index.jsx b/app/assets/javascripts/components/selectors/index.jsx
index b571e43d5..21ee96906 100644
--- a/app/assets/javascripts/components/selectors/index.jsx
+++ b/app/assets/javascripts/components/selectors/index.jsx
@@ -7,13 +7,15 @@ const getAccounts = state => state.getIn(['timelines', 'accounts']);
 const getAccountBase         = (state, id) => state.getIn(['timelines', 'accounts', id], null);
 const getAccountRelationship = (state, id) => state.getIn(['timelines', 'relationships', id]);
 
-export const getAccount = createSelector([getAccountBase, getAccountRelationship], (base, relationship) => {
-  if (base === null) {
-    return null;
-  }
+export const makeGetAccount = () => {
+  return createSelector([getAccountBase, getAccountRelationship], (base, relationship) => {
+    if (base === null) {
+      return null;
+    }
 
-  return base.set('relationship', relationship);
-});
+    return base.set('relationship', relationship);
+  });
+};
 
 const getStatusBase = (state, id) => state.getIn(['timelines', 'statuses', id], null);
 
@@ -65,7 +67,7 @@ export const getNotifications = createSelector([getNotificationsBase], (base) =>
   return arr;
 });
 
-const getSuggestionsBase = (state) => state.getIn(['timelines', 'suggestions']);
+const getSuggestionsBase = (state) => state.get('suggestions');
 
 export const getSuggestions = createSelector([getSuggestionsBase, getAccounts], (base, accounts) => {
   return base.map(accountId => accounts.get(accountId));
-- 
cgit 

