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