feat(ui): add spinner to content loading state

- Replace text with FontAwesome spinner icon
- Add loading-spinner styles for proper alignment
- Improve visual feedback during content fetch
This commit is contained in:
Gigi
2025-10-02 23:54:19 +02:00
parent 70fa3bb6a8
commit 4c2626f3c4
2 changed files with 17 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
import React from 'react'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
interface ContentPanelProps {
loading: boolean
@@ -22,7 +24,10 @@ const ContentPanel: React.FC<ContentPanelProps> = ({ loading, title, html, markd
if (loading) {
return (
<div className="content-panel loading">
<p>Loading content</p>
<div className="loading-spinner">
<FontAwesomeIcon icon={faSpinner} spin />
<span>Loading content</span>
</div>
</div>
)
}

View File

@@ -287,6 +287,17 @@ body {
color: #888;
}
.loading-spinner {
display: flex;
align-items: center;
gap: 0.5rem;
color: #888;
}
.loading-spinner svg {
font-size: 1.2rem;
}
.content-title {
margin: 0 0 1rem 0;
}