upload button

This commit is contained in:
2025-11-10 00:32:41 +01:00
parent 20cf597c5c
commit ac24297a7b
5 changed files with 153 additions and 51 deletions
+12
View File
@@ -35,6 +35,7 @@ const useSidebarProps = ({
currentTenantId,
handleTenantSelect,
openSettings,
handleFileSelection,
}) =>
useMemo(
() => ({
@@ -76,8 +77,19 @@ const useSidebarProps = ({
activeTenantId: currentTenantId,
onSelectTenant: handleTenantSelect,
onOpenSettings: openSettings,
onUploadFiles: (files, targetFolderId) => {
if (!handleFileSelection) {
return;
}
if (!files || files.length === 0) {
return;
}
const folderId = targetFolderId ?? selectedFolder ?? 'root';
handleFileSelection(files, folderId);
},
}),
[
handleFileSelection,
activeCorrespondentFilters,
activeTagFilters,
appStatus,