mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
27 lines
669 B
JavaScript
27 lines
669 B
JavaScript
import { defineMessages, useIntl } from 'react-intl';
|
|
import MetricsTable from './MetricsTable';
|
|
|
|
const messages = defineMessages({
|
|
events: { id: 'metrics.events', defaultMessage: 'Events' },
|
|
actions: { id: 'metrics.actions', defaultMessage: 'Actions' },
|
|
});
|
|
|
|
export default function EventsTable({ websiteId, ...props }) {
|
|
const { formatMessage } = useIntl();
|
|
|
|
function handleDataLoad(data) {
|
|
props.onDataLoad?.(data);
|
|
}
|
|
|
|
return (
|
|
<MetricsTable
|
|
{...props}
|
|
title={formatMessage(messages.events)}
|
|
type="event"
|
|
metric={formatMessage(messages.actions)}
|
|
websiteId={websiteId}
|
|
onDataLoad={handleDataLoad}
|
|
/>
|
|
);
|
|
}
|