Skip to content

Commit 37d059e

Browse files
committed
fix: recursive
1 parent 3d65b49 commit 37d059e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/breadcrumbs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function BreadcrumbLink({ link }: { link: StacLink }) {
4040

4141
return (
4242
<>
43-
{result.data && getBreadcrumbLink(result.data)}
43+
{/*{result.data && getBreadcrumbLink(result.data)}*/}
4444
<Breadcrumb.Item>
4545
<Breadcrumb.Link
4646
href="#"
@@ -63,9 +63,9 @@ function getBreadcrumbLink(value: StacValue) {
6363
const parentLink = getLink(value, "parent");
6464
const collectionLink = getLink(value, "collection");
6565

66-
return collectionLink ? (
66+
return collectionLink && collectionLink.href !== selfLink?.href ? (
6767
<BreadcrumbLink link={collectionLink} />
68-
) : parentLink && parentLink.href !== rootLink?.href ? (
68+
) : parentLink && parentLink.href !== rootLink?.href && parentLink.href !== selfLink?.href ? (
6969
<BreadcrumbLink link={parentLink} />
7070
) : (
7171
rootLink &&

0 commit comments

Comments
 (0)