Skip to content

Commit

Permalink
refactor: rename key to index
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni-Schroevers committed Aug 2, 2023
1 parent 7e3cf97 commit 70dafbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export function CategorySearchResult(props: CategorySearchResultProps) {
]}
>
<div>
{catProps?.breadcrumbs?.map((breadcrumb, key) => (
{catProps?.breadcrumbs?.map((breadcrumb, index) => (
<React.Fragment key={breadcrumb?.category_url_path}>
<Highlight
key={breadcrumb?.category_url_path}
text={breadcrumb?.category_name ?? ''}
highlight={search}
/>
{(catProps.breadcrumbs?.length ?? 0) > key + 1 && ' / '}
{(catProps.breadcrumbs?.length ?? 0) > index + 1 && ' / '}
</React.Fragment>
))}
<Highlight text={catProps?.name ?? ''} highlight={search} />
Expand Down

0 comments on commit 70dafbb

Please sign in to comment.