Added icons for browsers, OS and devices.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import MetricsTable from './MetricsTable';
|
||||
import FilterLink from 'components/common/FilterLink';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export function DevicesTable({ websiteId, ...props }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { basePath } = useRouter();
|
||||
|
||||
function renderLink({ x: device }) {
|
||||
return (
|
||||
@@ -11,7 +13,14 @@ export function DevicesTable({ websiteId, ...props }) {
|
||||
id="device"
|
||||
value={labels[device] && device}
|
||||
label={formatMessage(labels[device] || labels.unknown)}
|
||||
/>
|
||||
>
|
||||
<img
|
||||
src={`${basePath}/images/device/${device.toLowerCase() || 'unknown'}.png`}
|
||||
alt={device}
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
</FilterLink>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user