chore: custom wallet connect avatar

This commit is contained in:
Fernando Falci 2024-04-18 12:10:12 +02:00
parent 292337d086
commit eb210480bc
No known key found for this signature in database
GPG Key ID: AB787B833D90361D
3 changed files with 25 additions and 1 deletions

5
src/CustomAvatar.jsx Normal file
View File

@ -0,0 +1,5 @@
import avatar from './assets/avatar.svg';
export const CustomAvatar = () => {
return <img src={avatar} className="w-full" />;
};

18
src/assets/avatar.svg Normal file
View File

@ -0,0 +1,18 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="24" height="24" rx="12" fill="#181818"/>
<g clip-path="url(#clip0_122_1289)">
<path d="M8.34244 5.19835C8.45394 5.143 8.62598 5.07788 8.72793 5.05183H8.72474C8.82669 5.02579 9.03695 5.003 9.19625 5.003C9.35872 4.99974 9.5658 5.02253 9.67412 5.04858C9.77925 5.07462 9.96403 5.14951 10.0883 5.21137C10.2125 5.27323 10.3846 5.38718 10.477 5.46207C10.5662 5.54021 10.8274 5.82021 11.4677 6.57881L11.1651 6.93695C10.9994 7.13555 10.8465 7.31462 10.8274 7.33741C10.7955 7.37323 10.6904 7.26579 10.2954 6.80672C9.8812 6.3216 9.77288 6.21741 9.62633 6.14579C9.48297 6.07416 9.40651 6.05788 9.20899 6.05788C9.0051 6.05788 8.94138 6.0709 8.7789 6.15555C8.60368 6.24997 8.44757 6.42253 6.39908 8.8416C5.19483 10.2644 4.2104 11.4397 4.2104 11.456C4.2104 11.469 5.21076 11.4788 8.65465 11.4821L8.72474 11.2932C8.76616 11.189 8.83943 11.0328 8.8904 10.9416C8.94138 10.8537 9.93855 9.6523 11.1046 8.27183C12.2706 6.89137 13.3315 5.66393 13.4589 5.54346C13.6054 5.40021 13.7711 5.27974 13.9113 5.20811C14.0355 5.14625 14.2267 5.07462 14.3414 5.04532C14.4943 5.00625 14.6377 4.99648 14.883 5.00625C15.1378 5.01928 15.2748 5.04207 15.4564 5.11044C15.587 5.15602 15.7814 5.25369 15.8865 5.32207C15.9916 5.39369 16.1509 5.53044 16.237 5.62486C16.3262 5.71928 17.3424 6.91416 18.4989 8.2816C19.6554 9.64904 20.6525 10.8504 20.7131 10.9514C20.7736 11.0523 20.8596 11.2476 20.9042 11.3811C20.9679 11.5797 20.9839 11.6904 20.9839 11.9835C20.9839 12.2863 20.9711 12.3839 20.8947 12.6183C20.8469 12.7714 20.7545 12.9797 20.6876 13.0807C20.6239 13.1816 19.5789 14.4351 18.3683 15.8644C17.1545 17.2937 16.0936 18.5179 16.0108 18.583C15.9247 18.6481 15.7623 18.7458 15.6476 18.8011C15.5329 18.8565 15.3322 18.9249 15.2016 18.9542C15.0295 18.9932 14.883 19.003 14.6759 18.99C14.5166 18.9802 14.3095 18.9444 14.2139 18.9086C14.1184 18.876 13.975 18.8142 13.8954 18.7718C13.8157 18.7328 13.6755 18.6416 13.5831 18.5732C13.4939 18.5016 13.0989 18.0718 11.9998 16.7793L11.9329 16.8574C11.8947 16.8965 11.5952 17.2546 11.2607 17.6486C10.9293 18.0425 10.5789 18.4332 10.4833 18.5211C10.3878 18.6058 10.2125 18.7263 10.0883 18.7881C9.96403 18.85 9.76651 18.9216 9.64226 18.9509C9.51802 18.9769 9.31731 18.9997 9.19625 18.9997C9.072 18.9997 8.86173 18.9704 8.71837 18.9346C8.57819 18.8956 8.38386 18.8239 8.28828 18.7718C8.19271 18.7165 8.03979 18.6123 7.95058 18.5342C7.85819 18.4593 6.78775 17.2188 5.56439 15.7765C3.56368 13.4128 3.3343 13.1295 3.22279 12.8951C3.15589 12.7518 3.0858 12.5695 3.06987 12.4881C3.05076 12.4067 3.02527 12.2472 3.01572 12.13C3.00297 11.9965 3.01253 11.8174 3.04439 11.6416C3.07625 11.4625 3.13678 11.2737 3.21961 11.1044C3.2897 10.9611 3.4012 10.7788 3.4681 10.6974C3.53819 10.616 4.55448 9.41462 5.73324 8.02765C6.90881 6.64067 7.93147 5.45881 8.00793 5.40346C8.08439 5.34486 8.23412 5.25369 8.34244 5.19835Z" fill="white"/>
<path d="M6.45649 11.469C5.24906 11.4755 4.2487 11.4658 4.23596 11.4527C4.22322 11.4397 5.21401 11.4365 8.65472 11.4625L6.45649 11.469Z" fill="white"/>
<path d="M14.3097 6.22421C14.3703 6.1884 14.4722 6.13956 14.5327 6.11677C14.5933 6.09398 14.7303 6.0777 14.8354 6.08421C14.9628 6.08747 15.0871 6.12002 15.2018 6.17863C15.3642 6.25677 15.5395 6.45537 17.5115 8.78002C18.6871 10.1637 19.6715 11.3293 19.7575 11.4465L15.377 11.4498L15.3069 11.261C15.2687 11.1568 15.1795 10.9842 15.1126 10.8768C15.0425 10.7693 14.4849 10.0889 13.8669 9.36281C13.252 8.63677 12.7487 8.03444 12.7487 8.02142C12.7487 8.00514 13.0736 7.61119 13.4718 7.14235C13.8733 6.67351 14.2492 6.26002 14.3097 6.22421Z" fill="#181818"/>
<path d="M9.7543 11.5963C9.79891 11.5116 10.3214 10.8637 10.9171 10.1605C11.927 8.96232 12.0035 8.88093 12.0513 8.93302C12.0795 8.96187 12.5587 9.52727 13.1238 10.1942L13.1504 10.2256C13.9086 11.1242 14.2145 11.5116 14.2718 11.6419C14.3387 11.7949 14.3483 11.8535 14.3355 12.0488C14.326 12.1888 14.2941 12.3288 14.2559 12.407C14.2177 12.4786 13.6665 13.1526 13.0293 13.9014C12.3954 14.6535 11.5925 15.5977 11.2548 16.0014C10.914 16.4051 10.4456 16.9586 10.2163 17.2256C9.86581 17.6391 9.77023 17.7302 9.61094 17.8116C9.45165 17.893 9.38475 17.9093 9.19678 17.906C9.02156 17.906 8.93873 17.8865 8.81448 17.8214C8.72528 17.7726 8.58829 17.6651 8.50864 17.5772C8.42899 17.4926 7.44138 16.3335 6.31678 15.0051C5.19537 13.6735 4.27466 12.5795 4.27466 12.5698C4.27466 12.56 5.2559 12.5535 6.45696 12.5535C8.50545 12.5535 8.63926 12.5567 8.65838 12.6121C8.67112 12.6414 8.71572 12.7553 8.76351 12.8628C8.80811 12.967 8.88776 13.1167 8.94191 13.1916C8.99607 13.2665 9.42298 13.7842 9.89767 14.3409C10.3724 14.8977 10.7738 15.3502 10.7929 15.347C10.812 15.3405 10.9809 15.1581 11.5065 14.5395L11.3823 14.3865C11.3122 14.2986 10.9331 13.8493 10.538 13.3837C10.143 12.9181 9.78616 12.4721 9.74793 12.3907C9.69059 12.2767 9.67466 12.1888 9.67466 12C9.67466 11.8014 9.69059 11.7233 9.7543 11.5963Z" fill="#181818"/>
<path d="M15.1096 13.1231C15.1797 13.0156 15.2657 12.8431 15.304 12.7421L15.3677 12.5533L19.7737 12.55L19.5953 12.7552C19.4997 12.8691 18.5344 14.0087 17.4512 15.2882C16.1641 16.8152 15.4282 17.6584 15.3199 17.7398C15.2148 17.818 15.0905 17.8733 14.979 17.8961C14.8834 17.9156 14.7464 17.9221 14.6763 17.9124C14.6063 17.8994 14.4788 17.857 14.3896 17.8147C14.2558 17.7496 14.1188 17.6031 13.488 16.8607C13.0802 16.3821 12.7457 15.9817 12.7457 15.9719C12.7457 15.9621 13.2523 15.3631 13.8671 14.637C14.482 13.911 15.0427 13.2305 15.1096 13.1231Z" fill="#181818"/>
<path d="M18.7064 11.4694C18.1011 11.4759 17.0975 11.4759 16.4763 11.4694C15.855 11.4661 16.3488 11.4629 17.5754 11.4629C18.8019 11.4629 19.3117 11.4661 18.7064 11.4694Z" fill="white"/>
<path d="M7.55564 12.5436C6.95033 12.5501 5.95636 12.5501 5.34149 12.5436C4.72662 12.5404 5.22362 12.5371 6.4406 12.5371C7.65759 12.5371 8.16095 12.5404 7.55564 12.5436Z" fill="white"/>
<path d="M18.6743 12.5436C18.069 12.5501 17.075 12.5501 16.4601 12.5436C15.8453 12.5404 16.3423 12.5371 17.5593 12.5371C18.7762 12.5371 19.2796 12.5404 18.6743 12.5436Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_122_1289">
<rect width="18" height="14" fill="white" transform="translate(3 5)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -8,6 +8,7 @@ import App from './App.jsx';
import '@rainbow-me/rainbowkit/styles.css'; import '@rainbow-me/rainbowkit/styles.css';
import './index.css'; import './index.css';
import { CustomAvatar } from './CustomAvatar.jsx';
const queryClient = new QueryClient(); const queryClient = new QueryClient();
@ -22,7 +23,7 @@ ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode> <React.StrictMode>
<WagmiProvider config={config}> <WagmiProvider config={config}>
<QueryClientProvider client={queryClient}> <QueryClientProvider client={queryClient}>
<RainbowKitProvider> <RainbowKitProvider avatar={CustomAvatar}>
<App /> <App />
</RainbowKitProvider> </RainbowKitProvider>
</QueryClientProvider> </QueryClientProvider>