From 50769b0b6fce97124ce23610bc81f4befd5224cb Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Thu, 25 Jul 2024 18:11:31 -0500
Subject: Add label to profile card (#4843)

---
 src/components/ProfileCard.tsx | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

(limited to 'src/components/ProfileCard.tsx')

diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx
index 2d3b3240e..a263d1946 100644
--- a/src/components/ProfileCard.tsx
+++ b/src/components/ProfileCard.tsx
@@ -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}>
-- 
cgit 1.4.1

