import React from 'react'; import { Button, NoContent } from 'UI'; import { connect } from 'react-redux'; import { fetchList, setLastRead } from 'Duck/announcements'; import cn from 'classnames'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; import ListItem from './ListItem' interface Props { unReadNotificationsCount: number; setLastRead: Function; list: any; } function AnnouncementModal(props: Props) { const { list, unReadNotificationsCount } = props; // const onClear = (notification: any) => { // console.log('onClear', notification); // props.setViewed(notification.notificationId) // } return (
Announcements
} subtext="There are no alerts to show." // show={ !loading && unReadNotificationsCount === 0 } size="small" > {list.map((item: any, i: any) => (
{/* onClear(item)} loading={false} /> */}
))}
); } export default connect((state: any) => ({ list: state.getIn(['announcements', 'list']), }), { fetchList, setLastRead, })(AnnouncementModal);