fix: consolidate multiple skeleton loaders in article view

Remove duplicate ContentSkeleton components that were showing simultaneously.
Now uses a single skeleton for both loading and no-content states.

This follows DRY principles and prevents multiple skeletons from appearing
at the same time in the article view.
This commit is contained in:
Gigi
2025-10-25 00:47:50 +02:00
parent 29c4bcb69b
commit 04dea350a4

View File

@@ -728,13 +728,6 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
)
}
if (loading) {
return (
<div className="reader" aria-busy="true">
<ContentSkeleton />
</div>
)
}
const highlightRgb = hexToRgb(highlightColor)
@@ -791,7 +784,11 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
<TTSControls text={articleText} defaultLang={navigator?.language} settings={settings} />
</div>
)}
{markdown || html ? (
{loading || !markdown && !html ? (
<div className="reader" aria-busy="true">
<ContentSkeleton />
</div>
) : markdown || html ? (
<>
{markdown ? (
renderedMarkdownHtml && finalHtml ? (
@@ -973,11 +970,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
</div>
)}
</>
) : (
<div className="reader" aria-busy="true">
<ContentSkeleton />
</div>
)}
) : null}
</div>
</>
)