mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 07:04:19 +01:00
fix: display article immediately without waiting for highlights to load
This commit is contained in:
@@ -60,6 +60,11 @@ export function useArticleLoader({
|
||||
console.log('📰 Article loaded:', article.title)
|
||||
console.log('📍 Coordinate:', articleCoordinate)
|
||||
|
||||
// Set reader loading to false immediately after article content is ready
|
||||
// Don't wait for highlights to finish loading
|
||||
setReaderLoading(false)
|
||||
|
||||
// Fetch highlights asynchronously without blocking article display
|
||||
try {
|
||||
setHighlightsLoading(true)
|
||||
const fetchedHighlights = await fetchHighlightsForArticle(
|
||||
@@ -81,7 +86,6 @@ export function useArticleLoader({
|
||||
html: `<p>Failed to load article: ${err instanceof Error ? err.message : 'Unknown error'}</p>`,
|
||||
url: `nostr:${naddr}`
|
||||
})
|
||||
} finally {
|
||||
setReaderLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user