fix: add key prop to breadcrumb bar

This commit is contained in:
Ivana Andersson 2023-08-21 16:50:54 +03:00
parent a5372f226b
commit 3e4831e74d
1 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,10 @@ const BreadcrumbBar = ({ breadcrumbList }: BreadcrumbBarProps) => {
return ( return (
<nav className="breadcrumb-bar-nav"> <nav className="breadcrumb-bar-nav">
<ul className="breadcrumb-bar-ul"> <ul className="breadcrumb-bar-ul">
{breadcrumbList.map(item => ( {breadcrumbList.map((item, index) => (
<li className="breadcrumb-bar-li">{item}</li> <li className="breadcrumb-bar-li" key={index}>
{item}
</li>
))} ))}
</ul> </ul>
</nav> </nav>