umami/components/metrics/EventsTable.js

24 lines
523 B
JavaScript
Raw Normal View History

2020-08-25 08:49:14 +02:00
import MetricsTable from './MetricsTable';
2023-03-22 22:05:55 +01:00
import useMessages from 'hooks/useMessages';
2020-08-25 08:49:14 +02:00
2023-04-21 17:00:42 +02:00
export function EventsTable({ websiteId, ...props }) {
2023-03-22 22:05:55 +01:00
const { formatMessage, labels } = useMessages();
function handleDataLoad(data) {
props.onDataLoad?.(data);
}
2020-08-25 08:49:14 +02:00
return (
2022-08-05 22:07:20 +02:00
<MetricsTable
{...props}
2023-03-22 22:05:55 +01:00
title={formatMessage(labels.events)}
2022-08-05 22:07:20 +02:00
type="event"
2023-03-22 22:05:55 +01:00
metric={formatMessage(labels.actions)}
2022-08-05 22:07:20 +02:00
websiteId={websiteId}
onDataLoad={handleDataLoad}
/>
2020-08-25 08:49:14 +02:00
);
}
2023-04-21 17:00:42 +02:00
export default EventsTable;