From 86c82a74e457383ad8ececc0eec02ddaa8f42b1a Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 21 Apr 2025 10:18:23 +0200 Subject: [PATCH] Page rename --- components/carnet/navigation.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/components/carnet/navigation.tsx b/components/carnet/navigation.tsx index 6beb28f2..c41b70c4 100644 --- a/components/carnet/navigation.tsx +++ b/components/carnet/navigation.tsx @@ -13,14 +13,15 @@ type FolderType = 'Notes' | 'Diary' | 'Health' | 'Contacts'; interface FolderConfig { icon: LucideIcon; order: number; + displayName: string; } -// Define folder order and icons +// Define folder order, icons and display names const FOLDER_CONFIG: Record = { - 'Notes': { icon: FileText, order: 1 }, - 'Diary': { icon: Calendar, order: 2 }, - 'Health': { icon: Heart, order: 3 }, - 'Contacts': { icon: Users, order: 4 } + 'Notes': { icon: FileText, order: 1, displayName: 'Bloc-notes' }, + 'Diary': { icon: Calendar, order: 2, displayName: 'Journal' }, + 'Health': { icon: Heart, order: 3, displayName: 'Carnet Santé' }, + 'Contacts': { icon: Users, order: 4, displayName: 'Carnet d\'adresses' } }; interface ContactFile { @@ -128,7 +129,10 @@ export default function Navigation({ nextcloudFolders, onFolderSelect }: Navigat
{sortedFolders.map((folder) => { - const Icon = getFolderIcon(folder); + const config = FOLDER_CONFIG[folder as FolderType]; + const Icon = config?.icon || FileText; + const displayName = config?.displayName || folder; + return (