mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fix Sentry errors
This commit is contained in:
@ -7,41 +7,40 @@ import { useTranslation } from 'react-i18next'
|
||||
import { View } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
account: Mastodon.Account
|
||||
account?: Mastodon.Account
|
||||
withoutName?: boolean // For notification follow request etc.
|
||||
}
|
||||
|
||||
const HeaderSharedAccount = React.memo(
|
||||
({ account, withoutName = false }: Props) => {
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
const { colors } = useTheme()
|
||||
const HeaderSharedAccount: React.FC<Props> = ({ account, withoutName = false }) => {
|
||||
if (!account) return null
|
||||
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
{withoutName ? null : (
|
||||
<CustomText
|
||||
accessibilityHint={t('shared.header.shared.account.name.accessibilityHint')}
|
||||
style={{ marginRight: StyleConstants.Spacing.XS }}
|
||||
numberOfLines={1}
|
||||
>
|
||||
<ParseEmojis
|
||||
content={account?.display_name || account?.username}
|
||||
emojis={account?.emojis}
|
||||
fontBold
|
||||
/>
|
||||
</CustomText>
|
||||
)}
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
const { colors } = useTheme()
|
||||
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
{withoutName ? null : (
|
||||
<CustomText
|
||||
accessibilityHint={t('shared.header.shared.account.account.accessibilityHint')}
|
||||
style={{ flexShrink: 1, color: colors.secondary }}
|
||||
accessibilityHint={t('shared.header.shared.account.name.accessibilityHint')}
|
||||
style={{ marginRight: StyleConstants.Spacing.XS }}
|
||||
numberOfLines={1}
|
||||
>
|
||||
@{account.acct}
|
||||
<ParseEmojis
|
||||
content={account.display_name || account.username}
|
||||
emojis={account.emojis}
|
||||
fontBold
|
||||
/>
|
||||
</CustomText>
|
||||
</View>
|
||||
)
|
||||
},
|
||||
() => true
|
||||
)
|
||||
)}
|
||||
<CustomText
|
||||
accessibilityHint={t('shared.header.shared.account.account.accessibilityHint')}
|
||||
style={{ flexShrink: 1, color: colors.secondary }}
|
||||
numberOfLines={1}
|
||||
>
|
||||
@{account.acct}
|
||||
</CustomText>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default HeaderSharedAccount
|
||||
|
Reference in New Issue
Block a user