mirror of https://github.com/tooot-app/app
parent
8f8b7b41b9
commit
ed531d7371
|
@ -281,6 +281,7 @@
|
|||
"accessibilityLabel": "Actions for user {{user}}",
|
||||
"accessibilityHint": "You can mute, block, report or share this user"
|
||||
},
|
||||
"followed_by": " is following you",
|
||||
"moved": "User moved",
|
||||
"created_at": "Registered on: {{date}}",
|
||||
"summary": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Icon from '@components/Icon'
|
||||
import CustomText from '@components/Text'
|
||||
import { useRelationshipQuery } from '@utils/queryHooks/relationship'
|
||||
import {
|
||||
getInstanceAccount,
|
||||
getInstanceUri
|
||||
|
@ -7,6 +8,7 @@ import {
|
|||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { View } from 'react-native'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { PlaceholderLine } from 'rn-placeholder'
|
||||
|
@ -20,6 +22,7 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||
account,
|
||||
localInstance
|
||||
}) => {
|
||||
const { t } = useTranslation('screenTabs')
|
||||
const { colors } = useTheme()
|
||||
const instanceAccount = useSelector(
|
||||
getInstanceAccount,
|
||||
|
@ -27,6 +30,11 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||
)
|
||||
const instanceUri = useSelector(getInstanceUri)
|
||||
|
||||
const { data: relationship } = useRelationshipQuery({
|
||||
id: account!.id,
|
||||
options: { enabled: account !== undefined }
|
||||
})
|
||||
|
||||
const movedContent = useMemo(() => {
|
||||
if (account?.moved) {
|
||||
return (
|
||||
|
@ -65,6 +73,11 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||
@{localInstance ? instanceAccount?.acct : account?.acct}
|
||||
{localInstance ? `@${instanceUri}` : null}
|
||||
</CustomText>
|
||||
{relationship?.followed_by ? (
|
||||
<CustomText fontStyle='M' style={{ color: colors.secondary }}>
|
||||
{t('shared.account.followed_by')}
|
||||
</CustomText>
|
||||
) : null}
|
||||
{movedContent}
|
||||
{account?.locked ? (
|
||||
<Icon
|
||||
|
|
Loading…
Reference in New Issue