import { connect } from 'react-redux'; import { GlobalState, Notification as _Notification } from '../../interfaces'; import classes from './NotificationCenter.module.css'; import Notification from '../UI/Notification/Notification'; interface ComponentProps { notifications: _Notification[]; } const NotificationCenter = (props: ComponentProps): JSX.Element => { return (
{props.notifications.map((notification: _Notification) => { return ( ); })}
); }; const mapStateToProps = (state: GlobalState) => { return { notifications: state.notification.notifications, }; }; export default connect(mapStateToProps)(NotificationCenter);