mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
27 lines
806 B
JavaScript
27 lines
806 B
JavaScript
import React from 'react';
|
|
import MetricsTable from './MetricsTable';
|
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
import { getDeviceMessage } from 'components/messages';
|
|
import FilterLink from 'components/common/FilterLink';
|
|
|
|
export default function DevicesTable({ websiteId, ...props }) {
|
|
const { formatMessage } = useIntl();
|
|
|
|
function renderLink({ x: device }) {
|
|
return (
|
|
<FilterLink id="device" value={device} label={formatMessage(getDeviceMessage(device))} />
|
|
);
|
|
}
|
|
|
|
return (
|
|
<MetricsTable
|
|
{...props}
|
|
title={<FormattedMessage id="metrics.devices" defaultMessage="Devices" />}
|
|
type="device"
|
|
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
|
websiteId={websiteId}
|
|
renderLabel={renderLink}
|
|
/>
|
|
);
|
|
}
|