DRY
This commit is contained in:
@@ -694,6 +694,7 @@ function Overlay({
|
|||||||
text: record?.text || '',
|
text: record?.text || '',
|
||||||
facets: record?.facets,
|
facets: record?.facets,
|
||||||
})
|
})
|
||||||
|
const handle = sanitizeHandle(post.author.handle, '@')
|
||||||
|
|
||||||
const animatedStyle = useAnimatedStyle(() => ({
|
const animatedStyle = useAnimatedStyle(() => ({
|
||||||
opacity: 1 - seekingAnimationSV.get(),
|
opacity: 1 - seekingAnimationSV.get(),
|
||||||
@@ -780,7 +781,7 @@ function Overlay({
|
|||||||
<Text
|
<Text
|
||||||
style={[a.text_sm, t.atoms.text_contrast_high]}
|
style={[a.text_sm, t.atoms.text_contrast_high]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
{sanitizeHandle(post.author.handle, '@')}
|
{handle}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -789,18 +790,8 @@ function Overlay({
|
|||||||
<Button
|
<Button
|
||||||
label={
|
label={
|
||||||
profile.viewer?.following
|
profile.viewer?.following
|
||||||
? _(
|
? _(msg`Following ${handle}`)
|
||||||
msg`Following ${sanitizeHandle(
|
: _(msg`Follow ${handle}`)
|
||||||
post.author.handle,
|
|
||||||
'@',
|
|
||||||
)}`,
|
|
||||||
)
|
|
||||||
: _(
|
|
||||||
msg`Follow ${sanitizeHandle(
|
|
||||||
post.author.handle,
|
|
||||||
'@',
|
|
||||||
)}`,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
accessibilityHint={
|
accessibilityHint={
|
||||||
profile.viewer?.following ? _(msg`Unfollow user`) : ''
|
profile.viewer?.following ? _(msg`Unfollow user`) : ''
|
||||||
|
|||||||
Reference in New Issue
Block a user