From 4703e0faf716a441a5f4e52c5344c494a70a6315 Mon Sep 17 00:00:00 2001 From: Darshan Chauhan <46072647+GradleD@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:44:53 +0530 Subject: [PATCH 1/2] Updated avatar profile fetching issue --- components/UI/avatar.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/UI/avatar.tsx b/components/UI/avatar.tsx index e47f8b77..82a82b61 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: profileData } = useStarkProfile({ address }); // Fetching profile data using the hook + 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" /> ) : ( From 96425cf84dffcf97d012bbb691e41c6aafb87f72 Mon Sep 17 00:00:00 2001 From: Darshan Chauhan <46072647+GradleD@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:01:53 +0530 Subject: [PATCH 2/2] Update components/UI/avatar.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- components/UI/avatar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/UI/avatar.tsx b/components/UI/avatar.tsx index 82a82b61..27ae1499 100644 --- a/components/UI/avatar.tsx +++ b/components/UI/avatar.tsx @@ -18,7 +18,7 @@ type AvatarProps = { const Avatar: FunctionComponent = ({ address, width = "32" }) => { const { starknetIdNavigator } = useContext(StarknetIdJsContext); - const { data: profileData } = useStarkProfile({ address }); // Fetching profile data using the hook + const { data: profile } = useStarkProfile({ address }); const [profile, setProfile] = useState(null);