import {View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' import {Trans, useLingui} from '@lingui/react/macro' import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' import {type Shadow} from '#/state/cache/types' import {atoms as a, useTheme, web} from '#/alf' import {NewskieDialog} from '#/components/NewskieDialog' import {Text} from '#/components/Typography' import {IS_IOS, IS_NATIVE} from '#/env' export function ProfileHeaderHandle({ profile, disableTaps, }: { profile: Shadow disableTaps?: boolean }) { const t = useTheme() const {t: l} = useLingui() const invalidHandle = isInvalidHandle(profile.handle) const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy return ( {profile.viewer?.followedBy && !blockHide ? ( Follows you ) : undefined} {invalidHandle ? l`⚠Invalid Handle` : sanitizeHandle( profile.handle, '@', // forceLTR handled by CSS above on web IS_NATIVE, )} ) }