mirror of
https://github.com/dergigi/boris.git
synced 2026-02-12 02:25:01 +01:00
fix: show markdown content immediately when finalHtml is empty
- Render markdown directly with ReactMarkdown when finalHtml is not ready yet - Prevents empty content display while markdown is being converted to HTML - Fixes issue where default article text doesn't show
This commit is contained in:
@@ -190,8 +190,17 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
className={markdown ? "reader-markdown" : "reader-html"}
|
||||
dangerouslySetInnerHTML={{ __html: finalHtml }}
|
||||
/>
|
||||
) : markdown ? (
|
||||
<div
|
||||
ref={contentRef}
|
||||
className="reader-markdown"
|
||||
>
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
{markdown}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
) : (
|
||||
<div className="reader-markdown" ref={contentRef} />
|
||||
<div className="reader-html" ref={contentRef} />
|
||||
)
|
||||
) : (
|
||||
<div className="reader empty">
|
||||
|
||||
Reference in New Issue
Block a user