Skip to content

Commit 3aa7f7d

Browse files
unique key attribute for each react elemet
1 parent 6b93f91 commit 3aa7f7d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/common/ToolBar.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,16 @@ const MyLink = ({to, ...others }) =>{
6666
}
6767

6868
const AllLinks = ({classes})=>{
69-
return LinkData.map((link,key)=><Button variant="text" color="primary" >
70-
<Link key={key} component={MyLink} to={link.to} color='textSecondary' underline="none" classes={{root:classes.link}} >{link.text}</Link>
69+
return LinkData.map((link,key)=>
70+
<Button variant="text" color="primary" key={key.toString()} >
71+
<Link
72+
component={MyLink} to={link.to}
73+
color='textSecondary'
74+
underline="none"
75+
classes={{root:classes.link}}
76+
>
77+
{link.text}
78+
</Link>
7179
</Button>
7280
)
7381
}

0 commit comments

Comments
 (0)