Pages corrections pages missions
This commit is contained in:
parent
d03acd65a6
commit
b230da2a43
@ -76,12 +76,13 @@ export default function Navigation({ nextcloudFolders, onFolderSelect }: Navigat
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Make sure we always have the standard folders available
|
// 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
|
// 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
|
const allFolders = nextcloudFolders && nextcloudFolders.length > 0
|
||||||
? [...new Set([...nextcloudFolders])] // Remove duplicates
|
? [...new Set([...nextcloudFolders, 'Missions'])] // Always add Missions (from missions bucket)
|
||||||
: defaultFolders;
|
: [...defaultFolders, 'Missions']; // Include Missions in defaults too
|
||||||
|
|
||||||
// Sort folders according to the specified order
|
// Sort folders according to the specified order
|
||||||
const sortedFolders = allFolders.sort((a, b) => {
|
const sortedFolders = allFolders.sort((a, b) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user