blob: a4d37e2f2d8399681405b8d1fc0325e03a3f8e8c [file] [log] [blame]
import { connect } from 'react-redux';
import * as Actions from '../actions';
import NotificationPanelWithTransition from './NotificationPanelWithTransition';
const mapStateToProps = ({ notifications }) => {
return {
isVisible: notifications.notificationCenterVisible,
filter: notifications.selectedNotificationFilter,
notifications: notifications.notifications
};
};
const mapDispatchToProps = (dispatch) => {
return {
hideNotificationCenter: () => {
dispatch(Actions.hideNotificationCenter());
},
selectNotificationFilter: (filter) => {
dispatch(Actions.selectNotificationFilter(filter));
},
clearAllNotifications: () => {
dispatch(Actions.clearAllNotifications());
},
clearSingleNotification: (toastId) => {
dispatch(Actions.clearSingleNotification(toastId));
}
};
};
const NotificationPanelContainer = connect(
mapStateToProps,
mapDispatchToProps
)(NotificationPanelWithTransition);
export default NotificationPanelContainer;