From 8651f31ebb7cf9c6a0949503f2c2c5755328ce46 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 29 Aug 2024 19:22:53 -0500 Subject: 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 --- src/components/dialogs/Embed.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/dialogs/Embed.tsx') diff --git a/src/components/dialogs/Embed.tsx b/src/components/dialogs/Embed.tsx index 7d858cae4..f43c3c6fe 100644 --- a/src/components/dialogs/Embed.tsx +++ b/src/components/dialogs/Embed.tsx @@ -43,7 +43,7 @@ function EmbedDialogInner({ timestamp, }: Omit) { const t = useTheme() - const {_} = useLingui() + const {_, i18n} = useLingui() const ref = useRef(null) const [copied, setCopied] = useState(false) @@ -86,9 +86,9 @@ function EmbedDialogInner({ )} (@${escapeHtml( postAuthor.handle, )}) ${escapeHtml( - niceDate(timestamp), + niceDate(i18n, timestamp), )}` - }, [postUri, postCid, record, timestamp, postAuthor]) + }, [i18n, postUri, postCid, record, timestamp, postAuthor]) return ( -- cgit 1.4.1