mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Update SessionsTable.tsx
This commit is contained in:
parent
aec232eb6e
commit
9697ac61d3
1 changed files with 15 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import Avatar from 'components/common/Avatar';
|
||||||
import styles from './SessionsTable.module.css';
|
import styles from './SessionsTable.module.css';
|
||||||
import TypeIcon from 'components/common/TypeIcon';
|
import TypeIcon from 'components/common/TypeIcon';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
|
import { formatLongNumberOptions } from 'lib/format';
|
||||||
|
|
||||||
export function SessionsTable({ data = [] }: { data: any[]; showDomain?: boolean }) {
|
export function SessionsTable({ data = [] }: { data: any[]; showDomain?: boolean }) {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
@ -21,8 +22,20 @@ export function SessionsTable({ data = [] }: { data: any[]; showDomain?: boolean
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn name="visits" label={formatMessage(labels.visits)} width="100px" />
|
<GridColumn name="visits" label={formatMessage(labels.visits)} width="100px">
|
||||||
<GridColumn name="views" label={formatMessage(labels.views)} width="100px" />
|
{row => (
|
||||||
|
<span title={intl.formatNumber(row.visits)}>
|
||||||
|
{intl.formatNumber(row.visits, formatLongNumberOptions(row.visits))}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn name="views" label={formatMessage(labels.views)} width="100px">
|
||||||
|
{row => (
|
||||||
|
<span title={intl.formatNumber(row.views)}>
|
||||||
|
{intl.formatNumber(row.views, formatLongNumberOptions(row.views))}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</GridColumn>
|
||||||
<GridColumn name="country" label={formatMessage(labels.country)}>
|
<GridColumn name="country" label={formatMessage(labels.country)}>
|
||||||
{row => (
|
{row => (
|
||||||
<TypeIcon type="country" value={row.country}>
|
<TypeIcon type="country" value={row.country}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue