mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Updates
This commit is contained in:
		| @@ -1,22 +1,38 @@ | ||||
| import { ParseEmojis } from '@components/Parse' | ||||
| import { useNavigation } from '@react-navigation/native' | ||||
| import { StackNavigationProp } from '@react-navigation/stack' | ||||
| import { StyleConstants } from '@utils/styles/constants' | ||||
| import { useTheme } from '@utils/styles/ThemeManager' | ||||
| import React from 'react' | ||||
| import React, { useCallback } from 'react' | ||||
| import { Pressable, StyleSheet, Text, View } from 'react-native' | ||||
| import analytics from './analytics' | ||||
| import GracefullyImage from './GracefullyImage' | ||||
|  | ||||
| export interface Props { | ||||
|   account: Mastodon.Account | ||||
|   onPress: () => void | ||||
|   onPress?: () => void | ||||
|   origin?: string | ||||
| } | ||||
|  | ||||
| const ComponentAccount: React.FC<Props> = ({ account, onPress }) => { | ||||
| const ComponentAccount: React.FC<Props> = ({ | ||||
|   account, | ||||
|   onPress: customOnPress, | ||||
|   origin | ||||
| }) => { | ||||
|   const { theme } = useTheme() | ||||
|   const navigation = useNavigation< | ||||
|     StackNavigationProp<Nav.LocalStackParamList> | ||||
|   >() | ||||
|  | ||||
|   const onPress = useCallback(() => { | ||||
|     analytics('search_account_press', { page: origin }) | ||||
|     navigation.push('Screen-Shared-Account', { account }) | ||||
|   }, []) | ||||
|  | ||||
|   return ( | ||||
|     <Pressable | ||||
|       style={[styles.itemDefault, styles.itemAccount]} | ||||
|       onPress={onPress} | ||||
|       onPress={customOnPress || onPress} | ||||
|     > | ||||
|       <GracefullyImage | ||||
|         uri={{ original: account.avatar_static }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user