diff --git a/src/panelWebView/components/ContentHealth/ContentHealth.tsx b/src/panelWebView/components/ContentHealth/ContentHealth.tsx index 3269e5d2..b0c5db71 100644 --- a/src/panelWebView/components/ContentHealth/ContentHealth.tsx +++ b/src/panelWebView/components/ContentHealth/ContentHealth.tsx @@ -25,6 +25,14 @@ interface Props { } const ContentHealth: React.FunctionComponent = ({ contentHealth }) => { + const hasSeenContentHealth = React.useRef(false); + + React.useEffect(() => { + if (contentHealth !== undefined) { + hasSeenContentHealth.current = true; + } + }, [contentHealth]); + const openContentHealthDocs = React.useCallback(() => { Messenger.send(GeneralCommands.toVSCode.runCommand, { command: COMMAND_NAME.docs, @@ -40,11 +48,14 @@ const ContentHealth: React.FunctionComponent = ({ contentHealth }) => { ]), [openContentHealthDocs]); if (contentHealth === undefined) { - return ( - -

{localize(LocalizationKey.panelContentHealthChecking)}

-
- ); + if (!hasSeenContentHealth.current) { + return ( + +

{localize(LocalizationKey.panelContentHealthChecking)}

+
+ ); + } + return null; } const { internalLinks, brokenExternalLinks, readability, freshnessWarning, minReadability = 0 } = contentHealth;