replace avatar alert icon with <Text>
This commit is contained in:
@@ -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])
|
||||||
|
|||||||
Reference in New Issue
Block a user