diff --git a/components/UI/avatar.tsx b/components/UI/avatar.tsx index e47f8b77..27ae1499 100644 --- a/components/UI/avatar.tsx +++ b/components/UI/avatar.tsx @@ -7,6 +7,7 @@ import React, { import ProfilIcon from "@components/UI/iconsComponents/icons/profilIcon"; import theme from "@styles/theme"; import { StarknetIdJsContext } from "@context/StarknetIdJsProvider"; +import { useStarkProfile } from "@hooks/useStarkProfile"; // Ensure this hook is correctly imported import { StarkProfile } from "starknetid.js"; type AvatarProps = { @@ -16,6 +17,9 @@ type AvatarProps = { const Avatar: FunctionComponent = ({ address, width = "32" }) => { const { starknetIdNavigator } = useContext(StarknetIdJsContext); + + const { data: profile } = useStarkProfile({ address }); + const [profile, setProfile] = useState(null); useEffect(() => { @@ -32,6 +36,7 @@ const Avatar: FunctionComponent = ({ address, width = "32" }) => { width={width} height={width} className="rounded-full" + alt="User Avatar" /> ) : (