mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
5217d3009d
5 changed files with 27 additions and 18 deletions
|
|
@ -1,19 +1,14 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterLink from 'components/common/FilterLink';
|
||||
import { useMessages } from 'components/hooks';
|
||||
|
||||
const names = {
|
||||
'Mac OS': 'macOS',
|
||||
'Chrome OS': 'ChromeOS',
|
||||
'Sun OS': 'SunOS',
|
||||
};
|
||||
import { useMessages, useFormat } from 'components/hooks';
|
||||
|
||||
export function OSTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { formatOS } = useFormat();
|
||||
|
||||
function renderLink({ x: os }) {
|
||||
return (
|
||||
<FilterLink id="os" value={names[os] || os}>
|
||||
<FilterLink id="os" value={os} label={formatOS(os)}>
|
||||
<img
|
||||
src={`${process.env.basePath || ''}/images/os/${
|
||||
os?.toLowerCase().replaceAll(/\W/g, '-') || 'unknown'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue