diff --git a/src/components/Me.tsx b/src/components/Me.tsx index 05efc287..9b9c9ae7 100644 --- a/src/components/Me.tsx +++ b/src/components/Me.tsx @@ -449,7 +449,8 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr ) case 'reads': - if (showSkeletons) { + // Show loading skeletons while fetching reads + if (loading && reads.length === 0) { return (
{Array.from({ length: 6 }).map((_, i) => ( @@ -458,18 +459,23 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr
) } - return reads.length === 0 && !loading ? ( -
- No articles in your reads. -
- ) : ( + + // No reads at all + if (reads.length === 0) { + return ( +
+ No articles in your reads. +
+ ) + } + + // Show reads with filters + return ( <> - {reads.length > 0 && ( - - )} + {filteredReads.length === 0 ? (
No articles match this filter. @@ -490,7 +496,8 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr ) case 'links': - if (showSkeletons) { + // Show loading skeletons while fetching links + if (loading && links.length === 0) { return (
{Array.from({ length: 6 }).map((_, i) => ( @@ -499,18 +506,23 @@ const Me: React.FC = ({ relayPool, activeTab: propActiveTab, pubkey: pr
) } - return links.length === 0 && !loading ? ( -
- No links yet. -
- ) : ( + + // No links at all + if (links.length === 0) { + return ( +
+ No links yet. +
+ ) + } + + // Show links with filters + return ( <> - {links.length > 0 && ( - - )} + {filteredLinks.length === 0 ? (
No links match this filter.