mirror of
https://github.com/dergigi/boris.git
synced 2026-01-31 12:44:37 +01:00
debug: add extensive logging and alerts to diagnose bookmark fetching
- Add console logs for relay group creation and relay URLs - Add detailed logging in Bookmarks useEffect to track dependencies - Add alert to confirm bookmark fetch is starting - Log addressLoader and activeAccount availability - Track when fetchBookmarks is called vs when dependencies are missing This will help diagnose why bookmarks aren't appearing and why console logs might not be visible.
This commit is contained in:
@@ -40,6 +40,7 @@ function App() {
|
||||
// Note: We could use pool.group(relayUrls) for direct requests in the future
|
||||
pool.group(relayUrls)
|
||||
console.log('Created relay group with', relayUrls.length, 'relays')
|
||||
console.log('Relay URLs:', relayUrls)
|
||||
|
||||
// Create address loader using the pool directly
|
||||
// The pool will handle relay connections and the address loader will use the group
|
||||
|
||||
@@ -52,8 +52,14 @@ const Bookmarks: React.FC<BookmarksProps> = ({ addressLoader, onLogout }) => {
|
||||
const profile = useEventModel(Models.ProfileModel, activeAccount ? [activeAccount.pubkey] : null)
|
||||
|
||||
useEffect(() => {
|
||||
console.log('Bookmarks useEffect triggered')
|
||||
console.log('addressLoader:', !!addressLoader)
|
||||
console.log('activeAccount:', !!activeAccount)
|
||||
if (addressLoader && activeAccount) {
|
||||
console.log('Starting to fetch bookmarks...')
|
||||
fetchBookmarks()
|
||||
} else {
|
||||
console.log('Not fetching bookmarks - missing dependencies')
|
||||
}
|
||||
}, [addressLoader, activeAccount])
|
||||
|
||||
@@ -63,6 +69,7 @@ const Bookmarks: React.FC<BookmarksProps> = ({ addressLoader, onLogout }) => {
|
||||
try {
|
||||
setLoading(true)
|
||||
console.log('Fetching bookmarks for pubkey:', activeAccount.pubkey)
|
||||
alert('Starting bookmark fetch for: ' + activeAccount.pubkey.slice(0, 8) + '...')
|
||||
|
||||
// Use applesauce address loader to fetch bookmark lists (kind 10003)
|
||||
// This is the proper way according to NIP-51 and applesauce documentation
|
||||
|
||||
Reference in New Issue
Block a user