fix: add missing useEffect dependencies for article loading

- Fix useBookmarksData hook to include all callback dependencies
- Fix useArticleLoader hook to include all setter function dependencies
- Fix useExternalUrlLoader hook to include all setter function dependencies
- Ensures articles load properly when navigating
This commit is contained in:
Gigi
2025-10-07 22:04:12 +01:00
parent 5ef7d2c41c
commit a9847a8848
3 changed files with 3 additions and 3 deletions

View File

@@ -101,5 +101,5 @@ export function useArticleLoader({
}
loadArticle()
}, [naddr, relayPool])
}, [naddr, relayPool, setSelectedUrl, setReaderContent, setReaderLoading, setIsCollapsed, setHighlights, setHighlightsLoading, setCurrentArticleCoordinate, setCurrentArticleEventId, setCurrentArticle])
}

View File

@@ -100,7 +100,7 @@ export const useBookmarksData = ({
handleFetchHighlights()
}
handleFetchContacts()
}, [relayPool, activeAccount?.pubkey])
}, [relayPool, activeAccount?.pubkey, naddr, handleFetchBookmarks, handleFetchHighlights, handleFetchContacts])
return {
bookmarks,

View File

@@ -80,6 +80,6 @@ export function useExternalUrlLoader({
}
loadExternalUrl()
}, [url, relayPool])
}, [url, relayPool, setSelectedUrl, setReaderContent, setReaderLoading, setIsCollapsed, setHighlights, setHighlightsLoading, setCurrentArticleCoordinate, setCurrentArticleEventId])
}