mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
22 lines
715 B
JavaScript
22 lines
715 B
JavaScript
import { FormattedMessage } from 'react-intl';
|
|
import FilterLink from 'components/common/FilterLink';
|
|
import MetricsTable from 'components/metrics/MetricsTable';
|
|
import { BROWSERS } from 'lib/constants';
|
|
|
|
export default function BrowsersTable({ websiteId, ...props }) {
|
|
function renderLink({ x: browser }) {
|
|
return <FilterLink id="browser" value={browser} label={BROWSERS[browser] || browser} />;
|
|
}
|
|
|
|
return (
|
|
<MetricsTable
|
|
{...props}
|
|
title={<FormattedMessage id="metrics.browsers" defaultMessage="Browsers" />}
|
|
type="browser"
|
|
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
|
websiteId={websiteId}
|
|
renderLabel={renderLink}
|
|
/>
|
|
);
|
|
}
|