From 337462aa5e68014aa15788e4513e190b2e434d7e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 19 Sep 2016 23:25:59 +0200 Subject: Re-organizing components to be more modular, adding loading bars --- .../containers/notifications_container.jsx | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 app/assets/javascripts/components/containers/notifications_container.jsx (limited to 'app/assets/javascripts/components/containers/notifications_container.jsx') diff --git a/app/assets/javascripts/components/containers/notifications_container.jsx b/app/assets/javascripts/components/containers/notifications_container.jsx deleted file mode 100644 index 68173b34e..000000000 --- a/app/assets/javascripts/components/containers/notifications_container.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { connect } from 'react-redux'; -import { NotificationStack } from 'react-notification'; -import { dismissNotification } from '../actions/notifications'; - -const mapStateToProps = (state, props) => { - return { - notifications: state.get('notifications').map((item, i) => ({ - message: item.get('message'), - title: item.get('title'), - key: i, - action: 'Dismiss', - dismissAfter: 5000 - })).toJS() - }; -}; - -const mapDispatchToProps = (dispatch) => { - return { - onDismiss: notifiction => { - dispatch(dismissNotification(notifiction)); - } - }; -}; - -export default connect(mapStateToProps, mapDispatchToProps)(NotificationStack); -- cgit