mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
30 lines
714 B
JavaScript
30 lines
714 B
JavaScript
import MetricsTable from './MetricsTable';
|
|
import { useIntl } from 'react-intl';
|
|
import FilterLink from 'components/common/FilterLink';
|
|
import { labels } from 'components/messages';
|
|
|
|
export default function DevicesTable({ websiteId, ...props }) {
|
|
const { formatMessage } = useIntl();
|
|
|
|
function renderLink({ x: device }) {
|
|
return (
|
|
<FilterLink
|
|
id="device"
|
|
value={device}
|
|
label={formatMessage(labels[device] || labels.unknown)}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<MetricsTable
|
|
{...props}
|
|
title={formatMessage(labels.devices)}
|
|
type="device"
|
|
metric={formatMessage(labels.visitors)}
|
|
websiteId={websiteId}
|
|
renderLabel={renderLink}
|
|
/>
|
|
);
|
|
}
|