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.
This commit is contained in:
Claude committed 2025-11-27 20:42:47 +00:00
1 parent 5cec61d336
commit 5d011e81ae
1 file changed
+3
+3
View File
@@ -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);
}