Skip to content

Commit

Permalink
refactor: Fix the key regression in the breadcrumb item
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Apr 26, 2024
1 parent 13a96db commit 6552dd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/LibraryCopy/BreadcrumbContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const BreadcrumbContainer = ({
handleFolderClick: (path: string) => void;
}) => {
const initialPathSplit = path.split("/");

console.log("InitialPathSplit", initialPathSplit);
return (
<Breadcrumb style={{ margin: "1em 1em 1em 1em" }}>
{initialPathSplit.map((path: string, index) => {
Expand All @@ -23,7 +23,7 @@ const BreadcrumbContainer = ({
handleFolderClick("/" + newPath);
}
}}
key={`${path}`}
key={`${index}`}
to="#"
>
{index === 0 ? <HomeIcon /> : path}
Expand Down

0 comments on commit 6552dd7

Please sign in to comment.