Skip to content

Commit

Permalink
fix: use next links in navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Nov 19, 2024
1 parent d34dbc5 commit e3f4c2e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
BreadcrumbLink,
BreadcrumbRoot,
} from "@components/breadcrumb";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { ColorModeToggle } from "./components/color-mode-toggle";

Expand All @@ -15,13 +16,17 @@ function getBreadcrumbs() {
return <BreadcrumbCurrentLink>heystac</BreadcrumbCurrentLink>;
} else if (parts.length == 3 && parts[1] == "catalogs") {
return [
<BreadcrumbLink href="/" key={0}>
heystac
<BreadcrumbLink key={0} asChild>
<Link href="/">heystac</Link>
</BreadcrumbLink>,
<BreadcrumbCurrentLink key={1}>{parts[2]}</BreadcrumbCurrentLink>,
];
} else {
return <BreadcrumbLink href="/">heystac</BreadcrumbLink>;
return (
<BreadcrumbLink asChild>
<Link href="/">heystac</Link>
</BreadcrumbLink>
);
}
}

Expand Down

0 comments on commit e3f4c2e

Please sign in to comment.