diff options
author | Eric Bailey <git@esb.lol> | 2025-09-04 19:36:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-04 19:36:23 -0500 |
commit | c129108b786a3389181c401b0bdfe1a3de528ebb (patch) | |
tree | e075d0c41c8829d9c0b66464ba7cb86dd105be4e /src/components/PostControls/RepostButton.tsx | |
parent | 0b480bdaf862b0f93ed480589f81433bd6c93126 (diff) | |
download | voidsky-c129108b786a3389181c401b0bdfe1a3de528ebb.tar.zst |
108 fixes (#8977)
* Translation comment * Fix error handling in starter pack generation * Allow access to DM settings for age restricted users * Leave post stat unit formatting up to translators
Diffstat (limited to 'src/components/PostControls/RepostButton.tsx')
-rw-r--r-- | src/components/PostControls/RepostButton.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/PostControls/RepostButton.tsx b/src/components/PostControls/RepostButton.tsx index 522e80dd3..d4a3960a7 100644 --- a/src/components/PostControls/RepostButton.tsx +++ b/src/components/PostControls/RepostButton.tsx @@ -10,7 +10,7 @@ import {Button, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import {CloseQuote_Stroke2_Corner1_Rounded as Quote} from '#/components/icons/Quote' import {Repost_Stroke2_Corner3_Rounded as Repost} from '#/components/icons/Repost' -import {formatPostStatCount} from '#/components/PostControls/util' +import {useFormatPostStatCount} from '#/components/PostControls/util' import {Text} from '#/components/Typography' import { PostControlButton, @@ -25,7 +25,6 @@ interface Props { onQuote: () => void big?: boolean embeddingDisabled: boolean - compactCount?: boolean } let RepostButton = ({ @@ -35,12 +34,12 @@ let RepostButton = ({ onQuote, big, embeddingDisabled, - compactCount, }: Props): React.ReactNode => { const t = useTheme() - const {_, i18n} = useLingui() + const {_} = useLingui() const requireAuth = useRequireAuth() const dialogControl = Dialog.useDialogControl() + const formatPostStatCount = useFormatPostStatCount() const onPress = () => requireAuth(() => dialogControl.open()) @@ -88,7 +87,7 @@ let RepostButton = ({ <PostControlButtonIcon icon={Repost} /> {typeof repostCount !== 'undefined' && repostCount > 0 && ( <PostControlButtonText testID="repostCount"> - {formatPostStatCount(i18n, repostCount, {compact: compactCount})} + {formatPostStatCount(repostCount)} </PostControlButtonText> )} </PostControlButton> |