From 5272954b8b6706bbdd93b0ceb37e235db0093ac2 Mon Sep 17 00:00:00 2001 From: dankelleher Date: Mon, 20 Jan 2025 08:38:45 +0100 Subject: [PATCH] Fix for profile pic image url --- components/Profile/ProfileImage.tsx | 4 ++-- components/Profile/useProfile.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/Profile/ProfileImage.tsx b/components/Profile/ProfileImage.tsx index 0c96e872cc..3ff15e5b68 100644 --- a/components/Profile/ProfileImage.tsx +++ b/components/Profile/ProfileImage.tsx @@ -19,7 +19,7 @@ export const ProfileImage: FC = ({ publicKey, expanded, className }) => { ] const classes = classNames(commonClasses, className || profilePopupClasses) - const { profile, loading } = useProfile(publicKey) + const { profile, loading, url } = useProfile(publicKey) // Profile loading - show loading dots if (!profile && loading) return @@ -41,7 +41,7 @@ export const ProfileImage: FC = ({ publicKey, expanded, className }) => { export const useProfile = ( publicKey?: PublicKey -): { profile: Profile | undefined; loading: boolean } => { +): { profile: Profile | undefined; loading: boolean, url: string } => { const connection = useLegacyConnectionContext() const connectedWallet = useWalletOnePointOh() @@ -35,5 +35,7 @@ export const useProfile = ( } ) - return { profile, loading: isLoading } + const url = 'https://civic.me/' + profileWalletPublicKey?.toString() + + return { profile, loading: isLoading, url } }