From ef9d4f4e0615bcc42528e2e73ade0ba02baa3ed9 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sat, 8 Oct 2016 00:01:22 +0200
Subject: Use reselect to memoize denormalization in UI state Also upgrade
 react-redux to latest version. This is a performance update

---
 .../components/features/ui/containers/notifications_container.jsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'app/assets/javascripts/components/features/ui/containers/notifications_container.jsx')

diff --git a/app/assets/javascripts/components/features/ui/containers/notifications_container.jsx b/app/assets/javascripts/components/features/ui/containers/notifications_container.jsx
index bc339ef28..eb12989e5 100644
--- a/app/assets/javascripts/components/features/ui/containers/notifications_container.jsx
+++ b/app/assets/javascripts/components/features/ui/containers/notifications_container.jsx
@@ -4,14 +4,10 @@ import {
   dismissNotification,
   clearNotifications
 }                              from '../../../actions/notifications';
+import { getNotifications }    from '../../../selectors';
 
 const mapStateToProps = (state, props) => ({
-  notifications: state.get('notifications').map((item, i) => ({
-    message: item.get('message'),
-    title: item.get('title'),
-    key: item.get('key'),
-    dismissAfter: 5000
-  })).toJS()
+  notifications: getNotifications(state)
 });
 
 const mapDispatchToProps = (dispatch) => {
-- 
cgit 

