upload button
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user