Link to profile via handle vs did (#10012)

This commit is contained in:
DS Boyce
2026-03-05 12:52:39 -08:00
committed by GitHub
parent 8c705864a2
commit ece6dc251c
+7 -4
View File
@@ -14,6 +14,7 @@ import {
import {useLingui} from '@lingui/react/macro'
import {getModerationCauseKey} from '#/lib/moderation'
import {makeProfileLink} from '#/lib/routes/links'
import {forceLTR} from '#/lib/strings/bidi'
import {NON_BREAKING_SPACE} from '#/lib/strings/constants'
import {sanitizeDisplayName} from '#/lib/strings/display-names'
@@ -138,15 +139,17 @@ export function Link({
} & Omit<LinkProps, 'to' | 'label'>) {
const {t: l} = useLingui()
const profileURL = makeProfileLink({
did: profile.did,
handle: profile.handle,
})
return (
<InternalLink
label={l`View ${
profile.displayName || sanitizeHandle(profile.handle)
}s profile`}
to={{
screen: 'Profile',
params: {name: profile.did},
}}
to={profileURL}
style={[a.flex_col, style]}
{...rest}>
{children}