import Link from 'next/link'; import { GridTable, GridColumn } from 'react-basics'; import { useMessages, usePageQuery } from 'hooks'; import Empty from 'components/common/Empty'; export function EventDataTable({ data = [] }) { const { formatMessage, labels } = useMessages(); const { resolveUrl } = usePageQuery(); function linkToView(row, cell) { return ( {cell} ); } if (data.length === 0) { return ; } return ( {row => linkToView(row, row.event)} {row => linkToView(row, row.field)} {({ total }) => total.toLocaleString()} ); } export default EventDataTable;