Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

Link to profile via handle vs did (#10012)

authored by

DS Boyce and committed by
GitHub
ece6dc25 8c705864

+7 -4
+7 -4
src/components/ProfileCard.tsx
··· 14 14 import {useLingui} from '@lingui/react/macro' 15 15 16 16 import {getModerationCauseKey} from '#/lib/moderation' 17 + import {makeProfileLink} from '#/lib/routes/links' 17 18 import {forceLTR} from '#/lib/strings/bidi' 18 19 import {NON_BREAKING_SPACE} from '#/lib/strings/constants' 19 20 import {sanitizeDisplayName} from '#/lib/strings/display-names' ··· 138 139 } & Omit<LinkProps, 'to' | 'label'>) { 139 140 const {t: l} = useLingui() 140 141 142 + const profileURL = makeProfileLink({ 143 + did: profile.did, 144 + handle: profile.handle, 145 + }) 146 + 141 147 return ( 142 148 <InternalLink 143 149 label={l`View ${ 144 150 profile.displayName || sanitizeHandle(profile.handle) 145 151 }’s profile`} 146 - to={{ 147 - screen: 'Profile', 148 - params: {name: profile.did}, 149 - }} 152 + to={profileURL} 150 153 style={[a.flex_col, style]} 151 154 {...rest}> 152 155 {children}