Skip to content

Commit

Permalink
fix(nx-dev): breadcrumbs extra text with query param (#28732)
Browse files Browse the repository at this point in the history
Breadcrumb component was incorrectly showing extra text when the url has
a query parameter.
  • Loading branch information
isaacplmann authored and jaysoo committed Oct 31, 2024
1 parent f6064c4 commit 37b396e
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions nx-dev/ui-common/src/lib/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function Breadcrumbs({ path }: { path: string }): JSX.Element {
current: '/' + segments.slice(0, index + 1).join('/') === cleanedPath,
})),
];
const hasRef = path.includes('?') ? path.slice(0, path.indexOf('?')) : '';

if (pages.length === 1) {
return <></>;
Expand Down Expand Up @@ -51,26 +50,6 @@ export function Breadcrumbs({ path }: { path: string }): JSX.Element {
</div>
</li>
))}
{hasRef && (
<li>
<div className="flex items-center">
<ChevronRightIcon
className="h-5 w-5 flex-shrink-0 text-slate-500"
aria-hidden="true"
/>
<a
href={path}
className={classNames(
'text-sm font-medium hover:text-slate-800',
'ml-4 text-slate-500'
)}
aria-current="page"
>
{hasRef}
</a>
</div>
</li>
)}
</ol>
</nav>
</div>
Expand Down

0 comments on commit 37b396e

Please sign in to comment.