@@ -4,7 +4,6 @@ import {useLingui} from '@lingui/react'
4
4
import { useRequireAuth } from '#/state/session'
5
5
import { useSession } from '#/state/session'
6
6
import { EventStopper } from '#/view/com/util/EventStopper'
7
- import { formatCount } from '#/view/com/util/numeric/format'
8
7
import { useTheme } from '#/alf'
9
8
import { CloseQuote_Stroke2_Corner1_Rounded as Quote } from '#/components/icons/Quote'
10
9
import { Repost_Stroke2_Corner2_Rounded as Repost } from '#/components/icons/Repost'
@@ -14,6 +13,7 @@ import {
14
13
PostControlButtonIcon ,
15
14
PostControlButtonText ,
16
15
} from './PostControlButton'
16
+ import { useFormatPostStatCount } from './util'
17
17
18
18
interface Props {
19
19
isReposted : boolean
@@ -33,9 +33,10 @@ export const RepostButton = ({
33
33
embeddingDisabled,
34
34
} : Props ) => {
35
35
const t = useTheme ( )
36
- const { _, i18n } = useLingui ( )
36
+ const { _} = useLingui ( )
37
37
const { hasSession} = useSession ( )
38
38
const requireAuth = useRequireAuth ( )
39
+ const formatPostStatCount = useFormatPostStatCount ( )
39
40
40
41
return hasSession ? (
41
42
< EventStopper onKeyDown = { false } >
@@ -53,7 +54,7 @@ export const RepostButton = ({
53
54
< PostControlButtonIcon icon = { Repost } />
54
55
{ typeof repostCount !== 'undefined' && repostCount > 0 && (
55
56
< PostControlButtonText testID = "repostCount" >
56
- { formatCount ( i18n , repostCount ) }
57
+ { formatPostStatCount ( repostCount ) }
57
58
</ PostControlButtonText >
58
59
) }
59
60
</ PostControlButton >
@@ -105,7 +106,7 @@ export const RepostButton = ({
105
106
< PostControlButtonIcon icon = { Repost } />
106
107
{ typeof repostCount !== 'undefined' && repostCount > 0 && (
107
108
< PostControlButtonText testID = "repostCount" >
108
- { formatCount ( i18n , repostCount ) }
109
+ { formatPostStatCount ( repostCount ) }
109
110
</ PostControlButtonText >
110
111
) }
111
112
</ PostControlButton >
0 commit comments