import React from 'react'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; import { connect } from 'react-redux'; import { AppState } from 'features/reducers'; import { notificationsTypes, notificationsActions } from 'features/notifications'; import NotificationRow from './NotificationRow'; import './Notifications.scss'; interface Props { notifications: notificationsTypes.Notification[]; closeNotification: notificationsActions.TCloseNotification; } export class Notifications extends React.Component { public render() { return ( {this.props.notifications.map(n => { return ( ); })} ); } } const mapStateToProps = (state: AppState) => ({ notifications: state.notifications }); export default connect(mapStateToProps, { closeNotification: notificationsActions.closeNotification })(Notifications);