import EmptyPlaceholder from 'components/common/EmptyPlaceholder'; import { useMessages } from 'components/hooks'; import { useContext } from 'react'; import { GridColumn, GridTable } from 'react-basics'; import { ReportContext } from '../[reportId]/Report'; import { formatLongCurrency } from 'lib/format'; export function RevenueTable() { const { report } = useContext(ReportContext); const { formatMessage, labels } = useMessages(); const { data } = report || {}; if (!data) { return ; } return ( {row => row.currency} {row => formatLongCurrency(row.sum, row.currency)} {row => formatLongCurrency(row.avg, row.currency)} {row => row.count} {row => row.unique_count} ); } export default RevenueTable;