diff --git a/frontend/src/app/components/lib/AddressBar.tsx b/frontend/src/app/components/lib/AddressBar.tsx index a38dfa7..1cc51d5 100644 --- a/frontend/src/app/components/lib/AddressBar.tsx +++ b/frontend/src/app/components/lib/AddressBar.tsx @@ -14,20 +14,11 @@ import CopyButton from "../internal/util/CopyButton"; const UserModal = () => { const { address } = useAccount(); const { disconnect } = useDisconnect(); - - const [isCopied, setIsCopied] = useState(false); + const [imageError, setImageError] = useState(false); const { data: starkProfile } = useStarkProfile({ address, }); - useEffect(() => { - const id = setTimeout(() => { - setIsCopied(false); - }, 1500); - - return () => clearTimeout(id); - }, [isCopied]); - return ( {
- {starkProfile?.profilePicture ? ( + {!imageError && starkProfile?.profilePicture ? ( starknet profile setImageError(true)} /> ) : ( { const { data: starkProfile } = useStarkProfile({ address, }); - + const [imageError, setImageError] = useState(false); if (!address) { return null; } @@ -128,11 +120,14 @@ const AddressBar = () => { > { - {starkProfile?.profilePicture ? ( + {!imageError && starkProfile?.profilePicture ? ( starknet profile { + setImageError(true); + }} /> ) : (