carnet panel dairy health

This commit is contained in:
alma 2025-04-20 17:56:15 +02:00
parent 502316804f
commit 7e681e5a84

View File

@ -85,7 +85,7 @@ export const NotesView: React.FC<NotesViewProps> = ({ onNoteSelect, currentFolde
const dateMatch = note.title.match(/^(\d{4}-\d{2}-\d{2})/); const dateMatch = note.title.match(/^(\d{4}-\d{2}-\d{2})/);
if (dateMatch) { if (dateMatch) {
const date = parse(dateMatch[1], 'yyyy-MM-dd', new Date()); const date = parse(dateMatch[1], 'yyyy-MM-dd', new Date());
return `${format(date, 'EEEE d MMM yyyy', { locale: fr })} - ${note.title.replace(dateMatch[1], '').trim()}`; return note.title.replace(dateMatch[1], '').trim();
} }
} }
return note.title; return note.title;
@ -167,6 +167,9 @@ export const NotesView: React.FC<NotesViewProps> = ({ onNoteSelect, currentFolde
{currentFolder === 'Diary' || currentFolder === 'Health' ? ( {currentFolder === 'Diary' || currentFolder === 'Health' ? (
<> <>
<div className="text-sm font-medium text-carnet-text-primary"> <div className="text-sm font-medium text-carnet-text-primary">
{formatDate(note.lastModified)}
</div>
<div className="text-sm text-carnet-text-muted">
{formatNoteTitle(note)} {formatNoteTitle(note)}
</div> </div>
</> </>