From 5e114f7fb86b4205aefd6125fe5fc2348d3cfb0b Mon Sep 17 00:00:00 2001 From: Davinci Date: Thu, 16 May 2024 10:26:30 +0200 Subject: [PATCH] fix: verify page robohash --- src/pages/verify/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/verify/index.tsx b/src/pages/verify/index.tsx index eeedcec..08dd2df 100644 --- a/src/pages/verify/index.tsx +++ b/src/pages/verify/index.tsx @@ -17,6 +17,7 @@ import { MetadataController } from '../../controllers' import { getProfileRoute } from '../../routes' import { Meta, ProfileMetadata } from '../../types' import { + getRoboHashPicture, hexToNpub, parseJson, readContentOfZipEntry, @@ -112,8 +113,9 @@ export const VerifyPage = () => { setIsLoading(false) } - const imageLoadError = (event: any) => { - event.target.src = placeholderAvatar + const imageLoadError = (event: any, pubkey: string) => { + const npub = hexToNpub(pubkey) + event.target.src = npub } const getRoboImageUrl = (pubkey: string) => { @@ -143,7 +145,7 @@ export const VerifyPage = () => { return ( {imageLoadError(event, pubkey)}} src={profile?.picture || getRoboImageUrl(pubkey)} alt="Profile Image" className="profile-image"