mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
24 lines
689 B
JavaScript
24 lines
689 B
JavaScript
import FilterLink from 'components/common/FilterLink';
|
|
import MetricsTable from 'components/metrics/MetricsTable';
|
|
import { BROWSERS } from 'lib/constants';
|
|
import useMessages from 'hooks/useMessages';
|
|
|
|
export default function BrowsersTable({ websiteId, ...props }) {
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
function renderLink({ x: browser }) {
|
|
return <FilterLink id="browser" value={browser} label={BROWSERS[browser] || browser} />;
|
|
}
|
|
|
|
return (
|
|
<MetricsTable
|
|
{...props}
|
|
title={formatMessage(labels.browsers)}
|
|
type="browser"
|
|
metric={formatMessage(labels.visitors)}
|
|
websiteId={websiteId}
|
|
renderLabel={renderLink}
|
|
/>
|
|
);
|
|
}
|