Skip to content

Commit

Permalink
retreive and display ens pfps (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoo1 authored Jul 13, 2023
1 parent cabcb6f commit ec9b1a9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions apps/mobile/src/components/ProfilePicture/ProfilePicture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,30 @@ export function ProfilePicture({ userRef, style, ...rest }: ProfilePictureProps)
media {
... on Media {
previewURLs {
medium
small
}
}
}
}
}
... on EnsProfileImage {
__typename
profileImage {
__typename
previewURLs {
small
}
}
}
}
}
`,
userRef
);

const imageUrl = user?.profileImage?.token?.media?.previewURLs?.medium;
const { token, profileImage: ensImage } = user?.profileImage ?? {};
const imageUrl = token?.media?.previewURLs?.small ?? ensImage?.previewURLs?.small;

const letter = user?.username?.[0]?.toUpperCase();

const fallbackProfilePicture = (
Expand Down

1 comment on commit ec9b1a9

@vercel
Copy link

@vercel vercel bot commented on ec9b1a9 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.