import React, { useEffect } from 'react'; import { Button, NoContent, Loader } from 'UI'; import cn from 'classnames'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; import ListItem from './ListItem' import { useStore } from 'App/mstore'; import { useObserver } from 'mobx-react-lite'; interface Props { } function AlertTriggersModal(props: Props) { const { notificationStore } = useStore(); const count = useObserver(() => notificationStore.notificationsCount); const list = useObserver(() => notificationStore.notifications); const loading = useObserver(() => notificationStore.loading); const markingAsRead = useObserver(() => notificationStore.markingAsRead); const onClearAll = () => { const firstItem = list[0]; if (!firstItem) return; notificationStore.ignoreAllNotifications({ endTimestamp: firstItem.createdAt.ts }); } const onClear = (notification: any) => { notificationStore.ignoreNotification(notification.notificationId); } useEffect(() => { notificationStore.fetchNotifications(); }, []) return useObserver(() => (