From 04dea350a468724c1897aec24b335df8eb3e2a34 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 25 Oct 2025 00:47:50 +0200 Subject: [PATCH] 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. --- src/components/ContentPanel.tsx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/components/ContentPanel.tsx b/src/components/ContentPanel.tsx index 1b411b4f..ea353a62 100644 --- a/src/components/ContentPanel.tsx +++ b/src/components/ContentPanel.tsx @@ -728,13 +728,6 @@ const ContentPanel: React.FC = ({ ) } - if (loading) { - return ( -
- -
- ) - } const highlightRgb = hexToRgb(highlightColor) @@ -791,7 +784,11 @@ const ContentPanel: React.FC = ({ )} - {markdown || html ? ( + {loading || !markdown && !html ? ( +
+ +
+ ) : markdown || html ? ( <> {markdown ? ( renderedMarkdownHtml && finalHtml ? ( @@ -973,11 +970,7 @@ const ContentPanel: React.FC = ({ )} - ) : ( -
- -
- )} + ) : null} )