Skip to content

Commit

Permalink
fix: 🚑 applied changes
Browse files Browse the repository at this point in the history
  • Loading branch information
heorhi-deriv committed Oct 3, 2024
1 parent 41a9f60 commit 37b98e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Text } from "../Text";
import "./Breadcrumbs.scss";

type TItem = {
value: string | number;
value?: string | number;
text: string | JSX.Element;
};

Expand All @@ -30,7 +30,10 @@ export const Breadcrumbs = ({
const isLastItem = idx === items.length - 1;

return (
<li key={item.value} className="deriv-breadcrumbs__item">
<li
key={item.value ?? idx}
className="deriv-breadcrumbs__item"
>
<Text
className={clsx("deriv-breadcrumbs__text", {
"deriv-breadcrumbs__text--active": isLastItem,
Expand All @@ -40,7 +43,7 @@ export const Breadcrumbs = ({
>
{item.text}
</Text>
{idx < items.length - 1 &&
{!isLastItem &&
(separator ?? (
<LegacyChevronRight1pxIcon
className="deriv-breadcrumbs__chevron-icon"
Expand Down

0 comments on commit 37b98e9

Please sign in to comment.