From ff7da4c6a273d93cdac50521f2537e0311d05b84 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 2 Oct 2025 08:41:54 +0200 Subject: [PATCH] debug: add detailed logging to diagnose addressLoader type issue - Log addressLoader creation and type in App.tsx - Log addressLoader type and value in Bookmarks component - This will help identify why addressLoader is not a function - The error shows addressLoader exists but isn't callable This should reveal what createAddressLoader actually returns. --- dist/index.html | 4 ++-- src/App.tsx | 3 +++ src/components/Bookmarks.tsx | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/index.html b/dist/index.html index 2d9d9f30..9e130496 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,8 +5,8 @@ Markr - Nostr Bookmarks - - + +
diff --git a/src/App.tsx b/src/App.tsx index 04243d71..855fcc8d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -51,6 +51,9 @@ function App() { extraRelays: relayUrls }) + console.log('Created address loader:', loader) + console.log('Address loader type:', typeof loader) + setEventStore(store) setAccountManager(accounts) setRelayPool(pool) diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index a7ffc065..99d40c19 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -54,6 +54,8 @@ const Bookmarks: React.FC = ({ addressLoader, onLogout }) => { useEffect(() => { console.log('Bookmarks useEffect triggered') console.log('addressLoader:', !!addressLoader) + console.log('addressLoader type:', typeof addressLoader) + console.log('addressLoader value:', addressLoader) console.log('activeAccount:', !!activeAccount) if (addressLoader && activeAccount) { console.log('Starting to fetch bookmarks...')