mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
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:
1 file changed
+3
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user