Skip to content

Commit

Permalink
adjust pageReady handling in terms component
Browse files Browse the repository at this point in the history
  • Loading branch information
JKarlavige committed Sep 20, 2024
1 parent 46c23a5 commit 7034b34
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions website/src/components/term/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,19 @@ export default function Term({ id, children = undefined }) {

return (
<>
{pageReady ? (
<>
<span
key={id}
className={styles.term}
data-tip
data-for={uniqueID}
>
{displayValue}
</span>
{hoverSnippet && (
<ReactTooltip
id={uniqueID}
className={styles.termToolTip}
place="bottom"
effect="solid"
wrapper="span"
>
{hoverSnippet}
</ReactTooltip>
)}
</>
) : (
<span>{displayValue}</span>
<span key={id} className={styles.term} data-tip data-for={uniqueID}>
{displayValue}
</span>
{pageReady && hoverSnippet && (
<ReactTooltip
id={uniqueID}
className={styles.termToolTip}
place="bottom"
effect="solid"
wrapper="span"
>
{hoverSnippet}
</ReactTooltip>
)}
</>
);
Expand Down

0 comments on commit 7034b34

Please sign in to comment.