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
2021-02-08 23:47:20 +01:00
parent f5414412d4
commit 383ebc2775
79 changed files with 150 additions and 137 deletions

View File

@ -0,0 +1,30 @@
import RelativeTime from '@components/RelativeTime'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { StyleSheet, Text } from 'react-native'
export interface Props {
created_at: Mastodon.Status['created_at'] | number
}
const HeaderSharedCreated = React.memo(
({ created_at }: Props) => {
const { theme } = useTheme()
return (
<Text style={[styles.created_at, { color: theme.secondary }]}>
<RelativeTime date={created_at} />
</Text>
)
},
() => true
)
const styles = StyleSheet.create({
created_at: {
...StyleConstants.FontStyle.S
}
})
export default HeaderSharedCreated