Skip to content

Commit be43b26

Browse files
committed
use normal links inside the GlossaryTooltip to avoid circular dependency with TooltipLink
1 parent ca8dbbf commit be43b26

File tree

1 file changed

+7
-0
lines changed
  • src/components/Glossary/GlossaryTooltip

1 file changed

+7
-0
lines changed

src/components/Glossary/GlossaryTooltip/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useRouter } from "next/router"
33
import { Box, Text, VStack } from "@chakra-ui/react"
44

55
import Heading from "@/components/Heading"
6+
import InlineLink from "@/components/Link"
67
import Tooltip, { type TooltipProps } from "@/components/Tooltip"
78
import Translation from "@/components/Translation"
89

@@ -31,6 +32,9 @@ const GlossaryTooltip = ({
3132
<Translation
3233
id={termKey + "-term"}
3334
options={{ ns: "glossary-tooltip" }}
35+
// Override the default `a` tag transformation to avoid circular
36+
// dependency issues
37+
transform={{ a: InlineLink }}
3438
/>
3539
</Heading>
3640
{/**
@@ -43,6 +47,9 @@ const GlossaryTooltip = ({
4347
<Translation
4448
id={termKey + "-definition"}
4549
options={{ ns: "glossary-tooltip" }}
50+
// Override the default `a` tag transformation to avoid circular
51+
// dependency issues
52+
transform={{ a: InlineLink }}
4653
/>
4754
</Text>
4855
</VStack>

0 commit comments

Comments
 (0)