Skip to content

Commit

Permalink
feat: add slash between crumbs if there is more than one
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni-Schroevers committed Aug 2, 2023
1 parent 42fc89b commit 7e3cf97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ export function CategorySearchResult(props: CategorySearchResultProps) {
]}
>
<div>
{catProps?.breadcrumbs?.map((breadcrumb) => (
{catProps?.breadcrumbs?.map((breadcrumb, key) => (
<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 && ' / '}
</React.Fragment>
))}
<Highlight text={catProps?.name ?? ''} highlight={search} />
Expand Down

0 comments on commit 7e3cf97

Please sign in to comment.