about summary refs log tree commit diff
path: root/src/view/com/util/post-ctrls/RepostButton.web.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-08-29 19:22:53 -0500
committerGitHub <noreply@github.com>2024-08-29 19:22:53 -0500
commit8651f31ebb7cf9c6a0949503f2c2c5755328ce46 (patch)
tree04f9c08a3770cee554a6cd421a53dc04957457fb /src/view/com/util/post-ctrls/RepostButton.web.tsx
parentd5a76183746bc67f88b858add49c2dba52b99bb5 (diff)
downloadvoidsky-8651f31ebb7cf9c6a0949503f2c2c5755328ce46.tar.zst
Localize dates, counts (#5027)
* refactor: consistent localized formatting

* refactor: localized date time

* refactor: localize relative time with strings

* chore: fix typo from copy-paste

* Clean up useTimeAgo

* Remove old ago

* Const

* Reuse

* Prettier

---------

Co-authored-by: Mary <git@mary.my.id>
Diffstat (limited to 'src/view/com/util/post-ctrls/RepostButton.web.tsx')
-rw-r--r--src/view/com/util/post-ctrls/RepostButton.web.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.web.tsx b/src/view/com/util/post-ctrls/RepostButton.web.tsx
index 9a8776b9c..111b41dd7 100644
--- a/src/view/com/util/post-ctrls/RepostButton.web.tsx
+++ b/src/view/com/util/post-ctrls/RepostButton.web.tsx
@@ -128,6 +128,7 @@ const RepostInner = ({
   repostCount?: number
   big?: boolean
 }) => {
+  const {i18n} = useLingui()
   return (
     <View style={[a.flex_row, a.align_center, a.gap_xs, {padding: 5}]}>
       <Repost style={color} width={big ? 22 : 18} />
@@ -140,7 +141,7 @@ const RepostInner = ({
             isReposted && [a.font_bold],
             a.user_select_none,
           ]}>
-          {formatCount(repostCount)}
+          {formatCount(i18n, repostCount)}
         </Text>
       ) : undefined}
     </View>