Skip to content

Commit cf6d8b0

Browse files
authored
fix nested link in repost reason (#9450)
1 parent f985deb commit cf6d8b0

File tree

1 file changed

+16
-27
lines changed

1 file changed

+16
-27
lines changed

src/view/com/posts/PostFeedReason.tsx

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {useSession} from '#/state/session'
1010
import {atoms as a, useTheme} from '#/alf'
1111
import {Pin_Stroke2_Corner0_Rounded as PinIcon} from '#/components/icons/Pin'
1212
import {Repost_Stroke2_Corner3_Rounded as RepostIcon} from '#/components/icons/Repost'
13-
import {Link, WebOnlyInlineLinkText} from '#/components/Link'
13+
import {Link} from '#/components/Link'
1414
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
1515
import {Text} from '#/components/Typography'
1616
import {FeedNameText} from '../util/FeedInfoText'
@@ -82,32 +82,21 @@ export function PostFeedReason({
8282
width={13}
8383
height={13}
8484
/>
85-
<Text
86-
style={[t.atoms.text_contrast_medium, a.font_medium, a.leading_snug]}
87-
numberOfLines={1}>
88-
{isOwner ? (
89-
<Trans>Reposted by you</Trans>
90-
) : (
91-
<Trans>
92-
Reposted by{' '}
93-
<ProfileHoverCard did={reason.by.did}>
94-
<WebOnlyInlineLinkText
95-
label={reposter}
96-
numberOfLines={1}
97-
to={makeProfileLink(reason.by)}
98-
onPress={onOpenReposter}
99-
style={[
100-
t.atoms.text_contrast_medium,
101-
a.font_medium,
102-
a.leading_snug,
103-
]}
104-
emoji>
105-
{reposter}
106-
</WebOnlyInlineLinkText>
107-
</ProfileHoverCard>
108-
</Trans>
109-
)}
110-
</Text>
85+
<ProfileHoverCard did={reason.by.did}>
86+
<Text
87+
style={[
88+
t.atoms.text_contrast_medium,
89+
a.font_medium,
90+
a.leading_snug,
91+
]}
92+
numberOfLines={1}>
93+
{isOwner ? (
94+
<Trans>Reposted by you</Trans>
95+
) : (
96+
<Trans>Reposted by {reposter}</Trans>
97+
)}
98+
</Text>
99+
</ProfileHoverCard>
111100
</Link>
112101
)
113102
}

0 commit comments

Comments
 (0)