From 5bb81b3c227ebdc75079a46feb3ec26f33efaff0 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 16 Oct 2025 01:40:37 +0200 Subject: [PATCH] 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 --- src/components/Me.tsx | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/components/Me.tsx b/src/components/Me.tsx index 9b9c9ae7..e84ad433 100644 --- a/src/components/Me.tsx +++ b/src/components/Me.tsx @@ -449,8 +449,8 @@ const Me: React.FC = ({ 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 (
{Array.from({ length: 6 }).map((_, i) => ( @@ -460,15 +460,6 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr ) } - // No reads at all - if (reads.length === 0) { - return ( -
- No articles in your reads. -
- ) - } - // Show reads with filters return ( <> @@ -496,8 +487,8 @@ const Me: React.FC = ({ 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 (
{Array.from({ length: 6 }).map((_, i) => ( @@ -507,15 +498,6 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr ) } - // No links at all - if (links.length === 0) { - return ( -
- No links yet. -
- ) - } - // Show links with filters return ( <>