mirror of
https://github.com/dergigi/boris.git
synced 2026-01-04 15:34:21 +01:00
fix: always show skeletons for reads/links when no data
Removed empty state messages like "No articles in your reads" and "No links yet" - now just show loading skeletons until data arrives. This is simpler and prevents showing empty states while data is still being fetched in the background. Users will only see: - Skeletons when no data (loading or truly empty) - "No articles/links match this filter" when filtered out - Actual content when data is available
This commit is contained in:
@@ -449,8 +449,8 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
||||
)
|
||||
|
||||
case 'reads':
|
||||
// Show loading skeletons while fetching reads
|
||||
if (loading && reads.length === 0) {
|
||||
// Show loading skeletons while fetching reads or if no data yet
|
||||
if (reads.length === 0) {
|
||||
return (
|
||||
<div className="explore-grid">
|
||||
{Array.from({ length: 6 }).map((_, i) => (
|
||||
@@ -460,15 +460,6 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
||||
)
|
||||
}
|
||||
|
||||
// No reads at all
|
||||
if (reads.length === 0) {
|
||||
return (
|
||||
<div className="explore-loading" style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', padding: '4rem', color: 'var(--text-secondary)' }}>
|
||||
No articles in your reads.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Show reads with filters
|
||||
return (
|
||||
<>
|
||||
@@ -496,8 +487,8 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
||||
)
|
||||
|
||||
case 'links':
|
||||
// Show loading skeletons while fetching links
|
||||
if (loading && links.length === 0) {
|
||||
// Show loading skeletons while fetching links or if no data yet
|
||||
if (links.length === 0) {
|
||||
return (
|
||||
<div className="explore-grid">
|
||||
{Array.from({ length: 6 }).map((_, i) => (
|
||||
@@ -507,15 +498,6 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
||||
)
|
||||
}
|
||||
|
||||
// No links at all
|
||||
if (links.length === 0) {
|
||||
return (
|
||||
<div className="explore-loading" style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', padding: '4rem', color: 'var(--text-secondary)' }}>
|
||||
No links yet.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Show links with filters
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user