Skip to content

Commit

Permalink
use custom icon instead of provided one for connector in Header
Browse files Browse the repository at this point in the history
  • Loading branch information
kishkoigor committed Nov 11, 2024
1 parent e57e9d9 commit 21e59f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airdao/ui-library",
"version": "2.0.2",
"version": "2.0.3",
"types": "./dist/types.d.ts",
"exports": {
".": {
Expand Down
1 change: 1 addition & 0 deletions src/components/ConnectWallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Option = ({

const handleConnect = async (connector: Connector) => {
try {
//TODO: fix this
await connector.connect();
} catch (error) {
console.error('Failed to connect:', error);
Expand Down
7 changes: 6 additions & 1 deletion src/components/Header/components/HeaderBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import cross from '../assets/cross.svg';
import hamburgerIcon from '../assets/hamburger.svg';
import { AddressInfo } from '../../AddressInfo';
import { ConnectWalletModal } from '../../ConnectWalletModal';
import { CONNECTOR_ICONS } from '../../../utils';

export function HeaderBody({
disconnect,
Expand Down Expand Up @@ -157,7 +158,11 @@ export function HeaderBody({
onClick={handleAddressInfo}
>
<img
src={currentConnector.icon}
src={
currentConnector.icon
? CONNECTOR_ICONS[currentConnector.icon]
: ''
}
alt={currentConnector.name + 'icon'}
className={s['header__address-icon']}
/>
Expand Down

0 comments on commit 21e59f4

Please sign in to comment.