perf: avoid redundant image preload when using preview data

Skip image preload in useArticleLoader when preview data is available,
since the image should already be cached from BlogPostCard. This prevents
unnecessary network requests when navigating from explore.
This commit is contained in:
Gigi
2025-10-31 01:39:11 +01:00
parent ef05974a72
commit cea2d0eda2

View File

@@ -293,6 +293,9 @@ export function useArticleLoader({
url: `nostr:${naddr}`
})
setReaderLoading(false) // Turn off loading immediately - we have the preview!
// Don't preload image here - it should already be cached from BlogPostCard
// Preloading again would be redundant and could cause unnecessary network requests
} else {
// No cache, no EventStore, no preview data - need to load from relays
setReaderLoading(true)