2023-07-02 07:02:49 +02:00
|
|
|
import { useContext } from 'react';
|
2023-07-05 07:51:23 +02:00
|
|
|
import { GridTable, GridColumn } from 'react-basics';
|
2023-07-02 07:02:49 +02:00
|
|
|
import { useMessages } from 'hooks';
|
|
|
|
import { ReportContext } from '../Report';
|
|
|
|
|
|
|
|
export function EventDataTable() {
|
|
|
|
const { report } = useContext(ReportContext);
|
|
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
|
|
|
|
return (
|
2023-07-05 07:51:23 +02:00
|
|
|
<GridTable data={report?.data || []}>
|
|
|
|
<GridColumn name="field" label={formatMessage(labels.field)} />
|
|
|
|
<GridColumn name="value" label={formatMessage(labels.value)} />
|
|
|
|
<GridColumn name="total" label={formatMessage(labels.total)} />
|
|
|
|
</GridTable>
|
2023-07-02 07:02:49 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default EventDataTable;
|