From 926d78a379148187c2b272e0b1c96ab0c5d5c6b1 Mon Sep 17 00:00:00 2001 From: alma Date: Fri, 16 Jan 2026 13:19:54 +0100 Subject: [PATCH] Pages corrections journal --- components/carnet/editor.tsx | 31 ++- components/carnet/health-form.tsx | 416 ++++++++++++++++++++++++++++++ 2 files changed, 440 insertions(+), 7 deletions(-) create mode 100644 components/carnet/health-form.tsx diff --git a/components/carnet/editor.tsx b/components/carnet/editor.tsx index 147c89b..75007fd 100644 --- a/components/carnet/editor.tsx +++ b/components/carnet/editor.tsx @@ -5,6 +5,7 @@ import { Image, FileText, Link, List, Plus } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { useSession } from 'next-auth/react'; import { noteContentCache } from '@/lib/cache-utils'; +import { HealthForm } from './health-form'; interface Note { id: string; @@ -118,6 +119,12 @@ export const Editor: React.FC = ({ note, onSave, currentFolder = 'N debouncedSave(); }; + // Handle content change from HealthForm (direct string update) + const handleHealthContentChange = (newContent: string) => { + setContent(newContent); + debouncedSave(); + }; + const debouncedSave = () => { if (saveTimeout.current) { clearTimeout(saveTimeout.current); @@ -264,18 +271,28 @@ export const Editor: React.FC = ({ note, onSave, currentFolder = 'N )} {/* Editor Area */} -
+
{isLoading ? (
- ) : ( -