Skip to content

Commit

Permalink
fix(Breadcrumb): avoid React warning about duplication of key (#2687)
Browse files Browse the repository at this point in the history
... when same text is used in two items.

<img width="802" alt="Screenshot 2023-09-27 at 08 57 50"
src="https://github.com/dnbexperience/eufemia/assets/1501870/37cb59d1-7c72-49d8-bd33-3c5e92b351ad">
  • Loading branch information
tujoworker authored Sep 27, 2023
1 parent f0f70c7 commit 1e7d100
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const BreadcrumbMultiple = ({
{data?.map((breadcrumbItem, i) => {
return (
<BreadcrumbItem
key={`${breadcrumbItem.text}`}
key={i}
variant={
(i == 0 && 'home') ||
(i == data.length - 1 && 'current') ||
Expand Down

0 comments on commit 1e7d100

Please sign in to comment.