import { useEffect, useState } from 'react' import { CheckCircleIcon, InformationCircleIcon, XCircleIcon, } from '@heroicons/react/outline' import useMangoStore from '../stores/useMangoStore' const NotificationList = () => { const setMangoStore = useMangoStore((s) => s.set) const notifications = useMangoStore((s) => s.notifications) useEffect(() => { if (notifications.length > 0) { const id = setInterval(() => { setMangoStore((state) => { state.notifications = notifications.slice(1, notifications.length) }) }, 5000) return () => { clearInterval(id) } } }, [notifications, setMangoStore]) const reversedNotifications = [...notifications].reverse() return (
{description}
) : null} {txid ? ( View transaction {txid.slice(0, 8)}... {txid.slice(txid.length - 8)} ) : null}