diff --git a/app/carnet/page.tsx b/app/carnet/page.tsx index 0e646d7b..f276d6ef 100644 --- a/app/carnet/page.tsx +++ b/app/carnet/page.tsx @@ -166,7 +166,7 @@ export default function CarnetPage() { content: note.content }); - // Refresh the notes list + // Refresh the notes list after successful save const notesResponse = await fetch(`/api/nextcloud/files?folder=${selectedFolder}`); if (notesResponse.ok) { const updatedNotes = await notesResponse.json(); @@ -196,11 +196,6 @@ export default function CarnetPage() { if (isMobile) { setShowNotes(false); } - // Refresh the notes list - fetch(`/api/nextcloud/files?folder=${selectedFolder}`) - .then(response => response.json()) - .then(updatedNotes => setNotes(updatedNotes)) - .catch(error => console.error('Error refreshing notes:', error)); }; if (isLoading) {