diff --git a/app/pages/page.tsx b/app/pages/page.tsx index 9c15caf..71bae43 100644 --- a/app/pages/page.tsx +++ b/app/pages/page.tsx @@ -1078,18 +1078,10 @@ export default function CarnetPage() { /> ) : selectedFolder === 'Missions' ? ( - selectedMission ? ( - - ) : ( - - ) + ) : ( - ) : selectedFolder === 'Missions' && selectedMissionFile ? ( - { - await handleMissionFileSave(note.content); - }} - currentFolder="Missions" - /> + ) : selectedFolder === 'Missions' ? ( + selectedMission ? ( + selectedMissionFile ? ( + { + await handleMissionFileSave(note.content); + }} + currentFolder="Missions" + /> + ) : ( + + ) + ) : ( +
+
+

Sélectionnez une mission

+
+
+ ) ) : ( void; selectedFileKey?: string; + initialPath?: string; // Optional initial path (e.g., "attachments") } export const MissionFilesView: React.FC = ({ missionId, onFileSelect, - selectedFileKey + selectedFileKey, + initialPath = 'attachments' // Default to attachments folder }) => { const [files, setFiles] = useState([]); - const [currentPath, setCurrentPath] = useState(''); + const [currentPath, setCurrentPath] = useState(initialPath); const [isLoading, setIsLoading] = useState(true); const [error, setError] = useState(null);