1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2022-06-10 17:02:04 +02:00
parent be4fb53d03
commit 72eee3600f
4 changed files with 40 additions and 27 deletions

View File

@ -1,10 +1,11 @@
import Icon from '@components/Icon'
import RelativeTime from '@components/RelativeTime'
import CustomText from '@components/Text'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FormattedDate, FormattedRelativeTime } from 'react-intl'
import { FormattedDate } from 'react-intl'
export interface Props {
created_at: Mastodon.Status['created_at'] | number
@ -31,12 +32,7 @@ const HeaderSharedCreated = React.memo(
/>
</>
) : (
<FormattedRelativeTime
value={
-(new Date().getTime() - new Date(actualTime).getTime()) / 1000
}
updateIntervalInSeconds={1}
/>
<RelativeTime type='past' time={actualTime} />
)}
</CustomText>
{edited_at ? (