InteractionCounter: use shortNumberFormat
This commit is contained in:
parent
e8d6c7d4b6
commit
3590b75b6b
1 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
import classNames from 'clsx';
|
import classNames from 'clsx';
|
||||||
import { List as ImmutableList } from 'immutable';
|
import { List as ImmutableList } from 'immutable';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage, FormattedNumber } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import { openModal } from 'soapbox/actions/modals';
|
||||||
import { HStack, Text, Emoji } from 'soapbox/components/ui';
|
import { HStack, Text, Emoji } from 'soapbox/components/ui';
|
||||||
import { useAppSelector, useSoapboxConfig, useFeatures } from 'soapbox/hooks';
|
import { useAppSelector, useSoapboxConfig, useFeatures } from 'soapbox/hooks';
|
||||||
import { reduceEmoji } from 'soapbox/utils/emoji-reacts';
|
import { reduceEmoji } from 'soapbox/utils/emoji-reacts';
|
||||||
|
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
||||||
|
|
||||||
import type { Status } from 'soapbox/types/entities';
|
import type { Status } from 'soapbox/types/entities';
|
||||||
|
|
||||||
|
@ -196,7 +197,7 @@ const InteractionCounter: React.FC<IInteractionCounter> = ({ count, onClick, chi
|
||||||
>
|
>
|
||||||
<HStack space={1} alignItems='center'>
|
<HStack space={1} alignItems='center'>
|
||||||
<Text theme='primary' weight='bold'>
|
<Text theme='primary' weight='bold'>
|
||||||
<FormattedNumber value={count} />
|
{shortNumberFormat(count)}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text tag='div' theme='muted'>
|
<Text tag='div' theme='muted'>
|
||||||
|
|
Loading…
Reference in a new issue