Pages corrections pages missions

This commit is contained in:
alma 2026-01-16 14:08:45 +01:00
parent d03acd65a6
commit b230da2a43

View File

@ -76,12 +76,13 @@ export default function Navigation({ nextcloudFolders, onFolderSelect }: Navigat
};
// Make sure we always have the standard folders available
const defaultFolders = ['Notes', 'Diary', 'Health', 'Contacts', 'Missions'];
const defaultFolders = ['Notes', 'Diary', 'Health', 'Contacts'];
// Combine API-provided folders with defaults to ensure we always have folders to show
// Missions is always included as it's in a different bucket (missions, not pages)
const allFolders = nextcloudFolders && nextcloudFolders.length > 0
? [...new Set([...nextcloudFolders])] // Remove duplicates
: defaultFolders;
? [...new Set([...nextcloudFolders, 'Missions'])] // Always add Missions (from missions bucket)
: [...defaultFolders, 'Missions']; // Include Missions in defaults too
// Sort folders according to the specified order
const sortedFolders = allFolders.sort((a, b) => {