import React from 'react'; import { Button, NoContent } from 'UI'; import { connect } from 'react-redux'; import { fetchList, setViewed, clearAll } from 'Duck/notifications'; import { 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; clearingAll: boolean; loading: boolean; clearing: boolean; list: any; clearAll: Function; setViewed: Function; } function AlertTriggersModal(props: Props) { const { list, unReadNotificationsCount, loading, clearingAll, clearing } = props; const onClearAll = () => { const { list } = props; const firstItem = list.first(); props.clearAll({ endTimestamp: firstItem.createdAt.ts }); } const onClear = (notification: any) => { console.log('onClear', notification); props.setViewed(notification.notificationId) } return (