Updated session profile page. Added TypeIcon component. Added useRegionNames hook.

This commit is contained in:
Mike Cao 2024-07-29 01:38:36 -07:00
parent ac60d08ee5
commit c3c3b46ef6
313 changed files with 197 additions and 94 deletions

View file

@ -1,6 +1,7 @@
import MetricsTable, { MetricsTableProps } from './MetricsTable';
import FilterLink from 'components/common/FilterLink';
import { useMessages, useFormat } from 'components/hooks';
import TypeIcon from 'components/common/TypeIcon';
export function OSTable(props: MetricsTableProps) {
const { formatMessage, labels } = useMessages();
@ -9,14 +10,7 @@ export function OSTable(props: MetricsTableProps) {
function renderLink({ x: os }) {
return (
<FilterLink id="os" value={os} label={formatOS(os)}>
<img
src={`${process.env.basePath || ''}/images/os/${
os?.toLowerCase()?.replaceAll(/\W/g, '-') || 'unknown'
}.png`}
alt={os}
width={16}
height={16}
/>
<TypeIcon type="os" value={os?.toLowerCase()?.replaceAll(/\W/g, '-')} />
</FilterLink>
);
}