diff --git a/src/components/Identicon/index.tsx b/src/components/Identicon/index.tsx index 459ce10509..bc0e40aca5 100644 --- a/src/components/Identicon/index.tsx +++ b/src/components/Identicon/index.tsx @@ -1,13 +1,13 @@ import jazzicon from '@metamask/jazzicon' import { useWeb3React } from '@web3-react/core' import useENSAvatar from 'hooks/useENSAvatar' -import { useLayoutEffect, useMemo, useRef, useState } from 'react' +import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react' import styled from 'styled-components/macro' const StyledIdenticon = styled.div<{ iconSize: number }>` height: ${({ iconSize }) => `${iconSize}px`}; width: ${({ iconSize }) => `${iconSize}px`}; - border-radius: 1.125rem; + border-radius: 50%; background-color: ${({ theme }) => theme.deprecated_bg4}; font-size: initial; ` @@ -41,10 +41,12 @@ export default function Identicon({ size }: { size?: number }) { return }, [icon, iconRef]) + const handleError = useCallback(() => setFetchable(false), []) + return ( {avatar && fetchable ? ( - setFetchable(false)}> + ) : ( )} diff --git a/src/nft/components/profile/view/ProfileAccountDetails.tsx b/src/nft/components/profile/view/ProfileAccountDetails.tsx index ba53d94209..6f11435523 100644 --- a/src/nft/components/profile/view/ProfileAccountDetails.tsx +++ b/src/nft/components/profile/view/ProfileAccountDetails.tsx @@ -17,7 +17,11 @@ export const ProfileAccountDetails = () => { setCopied(account ?? '') }, [account, setCopied]) - return account ? ( + if (!account) { + return null + } + + return ( @@ -36,5 +40,5 @@ export const ProfileAccountDetails = () => { - ) : null + ) }