fix nested link in repost reason (#9450)

This commit is contained in:
Samuel Newman
2025-12-05 01:47:54 +02:00
committed by GitHub
parent f985debeca
commit cf6d8b060b
+16 -27
View File
@@ -10,7 +10,7 @@ import {useSession} from '#/state/session'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {Pin_Stroke2_Corner0_Rounded as PinIcon} from '#/components/icons/Pin' import {Pin_Stroke2_Corner0_Rounded as PinIcon} from '#/components/icons/Pin'
import {Repost_Stroke2_Corner3_Rounded as RepostIcon} from '#/components/icons/Repost' import {Repost_Stroke2_Corner3_Rounded as RepostIcon} from '#/components/icons/Repost'
import {Link, WebOnlyInlineLinkText} from '#/components/Link' import {Link} from '#/components/Link'
import {ProfileHoverCard} from '#/components/ProfileHoverCard' import {ProfileHoverCard} from '#/components/ProfileHoverCard'
import {Text} from '#/components/Typography' import {Text} from '#/components/Typography'
import {FeedNameText} from '../util/FeedInfoText' import {FeedNameText} from '../util/FeedInfoText'
@@ -82,32 +82,21 @@ export function PostFeedReason({
width={13} width={13}
height={13} height={13}
/> />
<Text <ProfileHoverCard did={reason.by.did}>
style={[t.atoms.text_contrast_medium, a.font_medium, a.leading_snug]} <Text
numberOfLines={1}> style={[
{isOwner ? ( t.atoms.text_contrast_medium,
<Trans>Reposted by you</Trans> a.font_medium,
) : ( a.leading_snug,
<Trans> ]}
Reposted by{' '} numberOfLines={1}>
<ProfileHoverCard did={reason.by.did}> {isOwner ? (
<WebOnlyInlineLinkText <Trans>Reposted by you</Trans>
label={reposter} ) : (
numberOfLines={1} <Trans>Reposted by {reposter}</Trans>
to={makeProfileLink(reason.by)} )}
onPress={onOpenReposter} </Text>
style={[ </ProfileHoverCard>
t.atoms.text_contrast_medium,
a.font_medium,
a.leading_snug,
]}
emoji>
{reposter}
</WebOnlyInlineLinkText>
</ProfileHoverCard>
</Trans>
)}
</Text>
</Link> </Link>
) )
} }