Add label to profile card (#4843)
This commit is contained in:
@@ -36,7 +36,7 @@ export function Default({
|
||||
logContext?: 'ProfileCard' | 'StarterPackProfilesList'
|
||||
}) {
|
||||
return (
|
||||
<Link did={profile.did}>
|
||||
<Link profile={profile}>
|
||||
<Card
|
||||
profile={profile}
|
||||
moderationOpts={moderationOpts}
|
||||
@@ -96,16 +96,24 @@ export function Header({
|
||||
}
|
||||
|
||||
export function Link({
|
||||
did,
|
||||
profile,
|
||||
children,
|
||||
style,
|
||||
...rest
|
||||
}: {did: string} & Omit<LinkProps, 'to'>) {
|
||||
}: {
|
||||
profile: AppBskyActorDefs.ProfileViewDetailed
|
||||
} & Omit<LinkProps, 'to' | 'label'>) {
|
||||
const {_} = useLingui()
|
||||
return (
|
||||
<InternalLink
|
||||
label={_(
|
||||
msg`View ${
|
||||
profile.displayName || sanitizeHandle(profile.handle)
|
||||
}'s profile`,
|
||||
)}
|
||||
to={{
|
||||
screen: 'Profile',
|
||||
params: {name: did},
|
||||
params: {name: profile.did},
|
||||
}}
|
||||
style={[a.flex_col, style]}
|
||||
{...rest}>
|
||||
|
||||
Reference in New Issue
Block a user