Skip to content

Commit 84638c3

Browse files
committed
define the glossary namespace name in the constants file
1 parent f566208 commit 84638c3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/Glossary/GlossaryDefinition/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import InlineLink from "@/components/Link"
55
import OldHeading from "@/components/OldHeading"
66
import Translation from "@/components/Translation"
77

8+
import { DEFAULT_GLOSSARY_NS } from "@/lib/constants"
9+
810
interface GlossaryDefinitionProps {
911
term: string
1012
size?: "md" | "sm"
1113
options?: ComponentProps<typeof Translation>["options"]
1214
}
1315

14-
const DEFAULT_NS = "glossary"
15-
1616
// Override the default `a` mapping to prevent displaying the glossary tooltip
1717
// in the glossary definition
1818
const components = {
@@ -22,7 +22,7 @@ const components = {
2222
const GlossaryDefinition = ({
2323
term,
2424
size = "md",
25-
options = { ns: DEFAULT_NS },
25+
options = { ns: DEFAULT_GLOSSARY_NS },
2626
}: GlossaryDefinitionProps) => {
2727
const headingStyles =
2828
size === "sm"

src/lib/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ export const SECTION_LABELS: NavSectionKey[] = [
8787
"participate",
8888
"research",
8989
]
90+
91+
// Glossary Definition Component
92+
export const DEFAULT_GLOSSARY_NS = "glossary"

0 commit comments

Comments
 (0)