import { ParseEmojis } from '@components/Parse' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' import { TabLocalStackParamList } from '@utils/navigation/navigators' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { PropsWithChildren } from 'react' import { Pressable, PressableProps, View } from 'react-native' import GracefullyImage from './GracefullyImage' import Icon from './Icon' import CustomText from './Text' export interface Props { account: Mastodon.Account props?: PressableProps } const ComponentAccount: React.FC = ({ account, props, children }) => { const { colors } = useTheme() const navigation = useNavigation>() if (!props) { props = { onPress: () => navigation.push('Tab-Shared-Account', { account }) } } return ( @{account.acct} {props.onPress && !props.disabled ? ( ) : ( children || null )} } /> ) } export default ComponentAccount