Skip to content

Commit f2b38a7

Browse files
committed
use next link for internal navigation
1 parent 7f17491 commit f2b38a7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/ui/breadcrumb.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from "react"
2+
import Link, { LinkProps } from "next/link"
23
import { LuChevronRight, LuMoreHorizontal } from "react-icons/lu"
34
import { Slot } from "@radix-ui/react-slot"
45

@@ -44,11 +45,12 @@ BreadcrumbItem.displayName = "BreadcrumbItem"
4445

4546
const BreadcrumbLink = React.forwardRef<
4647
HTMLAnchorElement,
47-
React.ComponentPropsWithoutRef<"a"> & {
48-
asChild?: boolean
49-
}
48+
React.ComponentPropsWithoutRef<"a"> &
49+
LinkProps & {
50+
asChild?: boolean
51+
}
5052
>(({ asChild, className, ...props }, ref) => {
51-
const Comp = asChild ? Slot : "a"
53+
const Comp = asChild ? Slot : Link
5254

5355
return (
5456
<Comp

0 commit comments

Comments
 (0)