From 5d011e81ae136a68333b0de916daa8c1a45eb55b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Nov 2025 20:42:47 +0000 Subject: [PATCH] debug: add logging to loadNotes function for troubleshooting Added console.log statements to track: - When notes API fetch is initiated - Number of notes fetched - The actual notes data returned This helps identify if the issue is with the API request, the response, or the data handling in the frontend. --- src/pages/Index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 7df0eaf..b5b9030 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -255,7 +255,10 @@ const Index = () => { const loadNotes = async () => { try { + console.log('[DEBUG] Fetching notes from API...'); const fetchedNotes = await NotesService.getNotes(); + console.log('[DEBUG] Notes fetched:', fetchedNotes.length, 'notes'); + console.log('[DEBUG] Notes data:', fetchedNotes); if (Array.isArray(fetchedNotes)) { setNotes(fetchedNotes); }