fix nested link in repost reason

This commit is contained in:
Samuel Newman
2025-11-26 12:57:35 +02:00
parent 6ab3751b5c
commit e9a7b21af0
+8 -19
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
style={[t.atoms.text_contrast_medium, a.font_medium, a.leading_snug]}
numberOfLines={1}>
{isOwner ? (
<Trans>Reposted by you</Trans>
) : (
<Trans>
Reposted by{' '}
<ProfileHoverCard did={reason.by.did}> <ProfileHoverCard did={reason.by.did}>
<WebOnlyInlineLinkText <Text
label={reposter}
numberOfLines={1}
to={makeProfileLink(reason.by)}
onPress={onOpenReposter}
style={[ style={[
t.atoms.text_contrast_medium, t.atoms.text_contrast_medium,
a.font_medium, a.font_medium,
a.leading_snug, a.leading_snug,
]} ]}
emoji> numberOfLines={1}>
{reposter} {isOwner ? (
</WebOnlyInlineLinkText> <Trans>Reposted by you</Trans>
</ProfileHoverCard> ) : (
</Trans> <Trans>Reposted by {reposter}</Trans>
)} )}
</Text> </Text>
</ProfileHoverCard>
</Link> </Link>
) )
} }