mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-23 18:41:36 +01:00
26 lines
712 B
JavaScript
26 lines
712 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 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}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default BrowsersTable;
|