Skip to content

Commit 8006a13

Browse files
authored
Merge pull request #12263 from ethereum/glossary-hydration
fix: hydration warnings on glossary
2 parents 5c88192 + 16a3dad commit 8006a13

File tree

1 file changed

+7
-1
lines changed
  • src/components/Glossary/GlossaryDefinition

1 file changed

+7
-1
lines changed

src/components/Glossary/GlossaryDefinition/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ const GlossaryDefinition = ({
4040
transform={components}
4141
/>
4242
</OldHeading>
43-
<Text {...textStyles}>
43+
{/**
44+
* `as="span"` prevents hydration warnings for strings that contain
45+
* elements that cannot be nested inside `p` tags, like `ul` tags
46+
* (found in some Glossary definition).
47+
* TODO: Develop a better solution to handle this case.
48+
*/}
49+
<Text as="span" {...textStyles}>
4450
<Translation
4551
id={term + "-definition"}
4652
options={options}

0 commit comments

Comments
 (0)