Skip to content

Commit a4470b8

Browse files
committed
fix: 404 links, add i18n-style link support to DocLink
1 parent 1284a83 commit a4470b8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/DocLink/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { cn } from "@/lib/utils/cn"
44

55
import Emoji from "../Emoji"
66
import { Center, Flex, Stack } from "../ui/flex"
7+
import InlineLink from "../ui/Link"
78
import { LinkBox, LinkOverlay } from "../ui/link-box"
89

910
import { useRtlFlip } from "@/hooks/useRtlFlip"
@@ -30,10 +31,12 @@ const DocLink = ({ href, children, isExternal = false }: DocLinkProps) => {
3031
<Emoji className="me-4 text-md" text=":page_with_curl:" />
3132
</Center>
3233
<Stack className="flex-1">
33-
<LinkOverlay href={href} className="no-underline">
34-
<p className="font-bold text-gray-600 dark:text-gray-200">
35-
{children}
36-
</p>
34+
<LinkOverlay asChild>
35+
<InlineLink href={href} hideArrow className="no-underline">
36+
<p className="font-bold text-gray-600 dark:text-gray-200">
37+
{children}
38+
</p>
39+
</InlineLink>
3740
</LinkOverlay>
3841
</Stack>
3942

0 commit comments

Comments
 (0)