issue-38 #62
@ -18,6 +18,7 @@ import { MetadataController } from '../../controllers'
|
||||
import { getProfileRoute } from '../../routes'
|
||||
import { Meta, ProfileMetadata } from '../../types'
|
||||
import {
|
||||
getRoboHashPicture,
|
||||
hexToNpub,
|
||||
parseJson,
|
||||
readContentOfZipEntry,
|
||||
@ -113,8 +114,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) => {
|
||||
@ -145,7 +147,7 @@ export const VerifyPage = () => {
|
||||
return (
|
||||
<Box className={styles.user}>
|
||||
<img
|
||||
onError={imageLoadError}
|
||||
onError={(event) => {imageLoadError(event, pubkey)}}
|
||||
src={profile?.picture || getRoboImageUrl(pubkey)}
|
||||
alt="Profile Image"
|
||||
className="profile-image"
|
||||
|
Loading…
Reference in New Issue
Block a user