replace avatar alert icon with <Text>

This commit is contained in:
Samuel Newman
2026-05-18 15:23:18 +03:00
parent 586641536d
commit be7c59ed20
+21 -7
View File
@@ -4,13 +4,13 @@ import {
Pressable, Pressable,
type StyleProp, type StyleProp,
StyleSheet, StyleSheet,
Text as RNText,
View, View,
type ViewStyle, type ViewStyle,
} from 'react-native' } from 'react-native'
import Svg, {Circle, Path, Rect} from 'react-native-svg' import Svg, {Circle, Path, Rect} from 'react-native-svg'
import {Image as ExpoImage} from 'expo-image' import {Image as ExpoImage} from 'expo-image'
import {type ModerationUI} from '@atproto/api' import {type ModerationUI} from '@atproto/api'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {msg} from '@lingui/core/macro' import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro' import {Trans} from '@lingui/react/macro'
@@ -266,13 +266,27 @@ let UserAvatar = ({
a.right_0, a.right_0,
a.bottom_0, a.bottom_0,
a.rounded_full, a.rounded_full,
{backgroundColor: t.palette.white}, {width: 16, height: 16},
a.align_center,
a.justify_center,
{backgroundColor: t.palette.pink},
{transform: [{scale: size / 42}]},
]}> ]}>
<FontAwesomeIcon <RNText
icon="exclamation-circle" style={[
style={{color: t.palette.negative_400}} a.text_sm,
size={Math.floor(size / 3)} a.font_bold,
/> a.text_center,
{
color: t.palette.white,
includeFontPadding: false,
textAlignVertical: 'center',
},
]}
minimumFontScale={1}
maxFontSizeMultiplier={1}>
!
</RNText>
</View> </View>
) )
}, [moderation?.alert, size, t]) }, [moderation?.alert, size, t])