From 865d3a26a0e83f8ef8f495cbac53c789339bcf86 Mon Sep 17 00:00:00 2001 From: admsk2 Date: Mon, 26 Aug 2024 13:13:50 +0200 Subject: [PATCH] refactor: Effigy icon fetching --- public/default_effigy.svg | 1 + src/components/Navbar/NavbarButtons/ProfileButton.tsx | 4 +++- src/components/ProfilePage/AddressBox/AddressBox.tsx | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 public/default_effigy.svg diff --git a/public/default_effigy.svg b/public/default_effigy.svg new file mode 100644 index 00000000..12c85dbe --- /dev/null +++ b/public/default_effigy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Navbar/NavbarButtons/ProfileButton.tsx b/src/components/Navbar/NavbarButtons/ProfileButton.tsx index ef3a1f10..e8b8bfd6 100644 --- a/src/components/Navbar/NavbarButtons/ProfileButton.tsx +++ b/src/components/Navbar/NavbarButtons/ProfileButton.tsx @@ -10,10 +10,12 @@ export const ProfileButton = () => { const theme = useTheme(); const { account } = useAccounts(); + const imageSrc = account?.address ? `https://effigy.im/a/${account?.address}.png` : '/default_effigy.svg'; + return ( navigate(JUMPER_LOYALTY_PATH)}> Effigy Wallet Icon { ? imageLink : address && isEVM ? `https://effigy.im/a/${address}.png` - : `https://effigy.im/a/${'jumper.eth'}.png`; + : '/default_effigy.svg'; const effigyLink = address && isEVM ? `https://effigy.im/a/${address}.png` - : `https://effigy.im/a/${'jumper.eth'}.png`; + : '/default_effigy.svg'; return (