2022-05-07 00:52:32 +02:00
|
|
|
import CustomText from '@components/Text'
|
2022-12-28 23:41:36 +01:00
|
|
|
import { getAccountStorage, useGlobalStorage } from '@utils/storage/actions'
|
|
|
|
import { StyleConstants } from '@utils/styles/constants'
|
2021-01-19 01:13:45 +01:00
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
|
|
|
import React from 'react'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
2022-12-28 23:41:36 +01:00
|
|
|
import { View } from 'react-native'
|
2021-01-19 01:13:45 +01:00
|
|
|
|
2022-12-24 01:18:20 +01:00
|
|
|
const ComposePostingAs = () => {
|
2022-12-28 23:41:36 +01:00
|
|
|
const accounts = useGlobalStorage.object('accounts')
|
|
|
|
if (!accounts.length) return null
|
|
|
|
|
2022-12-24 01:18:20 +01:00
|
|
|
const { t } = useTranslation('screenCompose')
|
|
|
|
const { colors } = useTheme()
|
2021-01-19 01:13:45 +01:00
|
|
|
|
2022-12-24 01:18:20 +01:00
|
|
|
return (
|
2022-12-28 23:41:36 +01:00
|
|
|
<View
|
|
|
|
style={{
|
|
|
|
marginHorizontal: StyleConstants.Spacing.Global.PagePadding,
|
|
|
|
marginTop: StyleConstants.Spacing.S
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<CustomText fontStyle='S' style={{ color: colors.secondary }}>
|
|
|
|
{t('content.root.header.postingAs', {
|
|
|
|
acct: getAccountStorage.string('auth.account.acct'),
|
2022-12-29 23:00:17 +01:00
|
|
|
domain: getAccountStorage.string('auth.account.domain')
|
2022-12-28 23:41:36 +01:00
|
|
|
})}
|
|
|
|
</CustomText>
|
|
|
|
</View>
|
2022-12-24 01:18:20 +01:00
|
|
|
)
|
|
|
|
}
|
2021-01-19 01:13:45 +01:00
|
|
|
|
|
|
|
export default ComposePostingAs
|