Skip to content

Commit b3a490f

Browse files
committed
remove react-avatar
- removed react-avatar dep - changed the navbar avatar example to use new avatar component closes #12
1 parent f8a1bb6 commit b3a490f

File tree

3 files changed

+9
-56
lines changed

3 files changed

+9
-56
lines changed

package-lock.json

Lines changed: 1 addition & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"container-query-polyfill": "^1.0.2",
7272
"date-fns": "^2.30.0",
7373
"luxon": "^3.3.0",
74-
"react-avatar": "^5.0.3",
7574
"react-select": "^5.7.4"
7675
},
7776
"peerDependencies": {
@@ -85,4 +84,4 @@
8584
"@babel/preset-react"
8685
]
8786
}
88-
}
87+
}

src/lib/NavBar/NavBar.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import walletConnectIcon from "../../../public/logos/wallet-connect-logo.svg";
66
import c4LogoIcon from "../../../public/logos/c4-logo.svg";
77
import registerIcon from "../../../public/icons/register.svg";
88
import { Dropdown } from "../Dropdown/Dropdown";
9-
import Avatar from "react-avatar";
109
import { ModalProps, NavBarProps, Web3ProviderType } from "./NavBar.types";
1110
import "./NavBar.scss";
11+
import { Avatar } from "../Avatar";
1212

1313
const UserDropdown = ({
1414
userImage = "/",
@@ -20,7 +20,12 @@ const UserDropdown = ({
2020
logoutHandler: () => void;
2121
}) => {
2222
const avatar = () => (
23-
<Avatar src={userImage} name={username} size="30px" round={true} />
23+
<Avatar
24+
imgElement={userImage ? <img src={userImage} alt={username} /> : undefined}
25+
name={username}
26+
size={30}
27+
round={30}
28+
/>
2429
);
2530

2631
const children = (

0 commit comments

Comments
 (0)