Skip to content

Commit

Permalink
fix: miss key when use img in rightContent (#108)
Browse files Browse the repository at this point in the history
`key={item.icon}`,  there will be no icon when use img as a item.
  • Loading branch information
Fay-Hu authored Jul 5, 2023
1 parent 54df2f7 commit 1a58b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Navbar = (props: NavbarProps) => {
</div>
<div className="Navbar-right">
{rightContent.map((item) => (
<IconButton size="lg" {...item} key={item.icon} />
<IconButton size="lg" key={item.icon} {...item} />
))}
</div>
</header>
Expand Down

0 comments on commit 1a58b0b

Please sign in to comment.