mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 14:44:26 +01:00
fix: show skeletons during initial tab load for reads/links
This commit is contained in:
@@ -449,8 +449,8 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
|||||||
)
|
)
|
||||||
|
|
||||||
case 'reads':
|
case 'reads':
|
||||||
// Show loading skeletons while fetching reads or if no data yet
|
// Show loading skeletons while fetching or if no data
|
||||||
if (reads.length === 0) {
|
if (reads.length === 0 || (loading && !loadedTabs.has('reads'))) {
|
||||||
return (
|
return (
|
||||||
<div className="explore-grid">
|
<div className="explore-grid">
|
||||||
{Array.from({ length: 6 }).map((_, i) => (
|
{Array.from({ length: 6 }).map((_, i) => (
|
||||||
@@ -487,8 +487,8 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
|||||||
)
|
)
|
||||||
|
|
||||||
case 'links':
|
case 'links':
|
||||||
// Show loading skeletons while fetching links or if no data yet
|
// Show loading skeletons while fetching or if no data
|
||||||
if (links.length === 0) {
|
if (links.length === 0 || (loading && !loadedTabs.has('links'))) {
|
||||||
return (
|
return (
|
||||||
<div className="explore-grid">
|
<div className="explore-grid">
|
||||||
{Array.from({ length: 6 }).map((_, i) => (
|
{Array.from({ length: 6 }).map((_, i) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user