Renaming the Follow button to "Follow back" when followed by user (#5281)

* Renaming the follow button to follow back when followed by user

* Fixing conditions and reusing existing translation
zio/stable^2^2
Wesley 2024-09-12 11:59:12 -03:00 committed by GitHub
parent e0d9e75407
commit 86abeb80b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -219,6 +219,8 @@ let ProfileHeaderStandard = ({
<ButtonText>
{profile.viewer?.following ? (
<Trans>Following</Trans>
) : profile.viewer?.followedBy ? (
<Trans>Follow Back</Trans>
) : (
<Trans>Follow</Trans>
)}

View File

@ -61,7 +61,7 @@ export function FollowButton({
label={_(msg({message: 'Unfollow', context: 'action'}))}
/>
)
} else {
} else if (!profile.viewer.followedBy) {
return (
<Button
type={unfollowedType}
@ -70,5 +70,14 @@ export function FollowButton({
label={_(msg({message: 'Follow', context: 'action'}))}
/>
)
} else {
return (
<Button
type={unfollowedType}
labelStyle={labelStyle}
onPress={onPressFollow}
label={_(msg({message: 'Follow Back', context: 'action'}))}
/>
)
}
}