Skip to content

Commit b48b810

Browse files
committed
fix: link overrides
rm redundant use of TooltipLink inside Translation (applied at markdown level), use InlineLink instead
1 parent 03febc5 commit b48b810

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/components/Glossary/GlossaryTooltip/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ 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"
76
import Tooltip, { type TooltipProps } from "@/components/Tooltip"
87
import Translation from "@/components/Translation"
98

@@ -15,10 +14,6 @@ type GlossaryTooltipProps = Omit<TooltipProps, "content"> & {
1514
termKey: string
1615
}
1716

18-
const components = {
19-
a: InlineLink,
20-
}
21-
2217
const GlossaryTooltip = ({
2318
children,
2419
termKey,
@@ -36,7 +31,6 @@ const GlossaryTooltip = ({
3631
<Translation
3732
id={termKey + "-term"}
3833
options={{ ns: "glossary-tooltip" }}
39-
transform={components}
4034
/>
4135
</Heading>
4236
{/**
@@ -49,7 +43,6 @@ const GlossaryTooltip = ({
4943
<Translation
5044
id={termKey + "-definition"}
5145
options={{ ns: "glossary-tooltip" }}
52-
transform={components}
5346
/>
5447
</Text>
5548
</VStack>

src/components/Translation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useTranslation } from "next-i18next"
55

66
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
77

8-
import TooltipLink from "./TooltipLink"
8+
import InlineLink from "./Link"
99

1010
type TranslationProps = {
1111
id: string
@@ -16,7 +16,7 @@ type TranslationProps = {
1616
// Custom components mapping to be used by `htmr` when parsing the translation
1717
// text
1818
const defaultTransform = {
19-
a: TooltipLink,
19+
a: InlineLink,
2020
}
2121

2222
// Renders the translation string for the given translation key `id`. It

0 commit comments

Comments
 (0)