1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Account actions working for #638

This commit is contained in:
xmflsct
2023-01-02 02:08:12 +01:00
parent 62df29a479
commit 6dafbc96af
73 changed files with 262 additions and 626 deletions

View File

@ -1,8 +1,7 @@
import Button from '@components/Button'
import { useNavigation } from '@react-navigation/native'
import { StackNavigationProp } from '@react-navigation/stack'
import { RootStackParamList } from '@utils/navigation/navigators'
import { StyleConstants } from '@utils/styles/constants'
import { useTranslation } from 'react-i18next'
import { Alert } from 'react-native'
export interface Props {
sensitiveShown: boolean
@ -14,7 +13,7 @@ const AttachmentAltText: React.FC<Props> = ({ sensitiveShown, text }) => {
return null
}
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
const { t } = useTranslation('componentTimeline')
return !sensitiveShown ? (
<Button
@ -28,7 +27,7 @@ const AttachmentAltText: React.FC<Props> = ({ sensitiveShown, text }) => {
type='text'
content='ALT'
fontBold
onPress={() => navigation.navigate('Screen-Actions', { type: 'alt_text', text })}
onPress={() => Alert.alert(t('shared.attachment.altText'), text)}
/>
) : null
}