import { Card } from '@renderer/components/ui/card' import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@renderer/components/ui/table' import { useEffect, useState } from 'react' export default function Home(): JSX.Element { const [eventStatistics, setEventStatistics] = useState< { kind: number; description: string; count: number }[] >([]) const [totalEventCount, setTotalEventCount] = useState(0) useEffect(() => { const init = async () => { const [eventStatistics, totalEventCount] = await Promise.all([ window.api.relay.getEventStatistics(), window.api.relay.getTotalEventCount() ]) setEventStatistics(eventStatistics) setTotalEventCount(totalEventCount) } init() }, []) return (

Total Events

{totalEventCount}
kind description count {eventStatistics.map(({ kind, count, description }) => ( {kind} {description} {count} ))}
) }