cleanup
This commit is contained in:
@@ -19,6 +19,7 @@ import { PointerTrackingProvider, usePointerTracking } from './PointerTrackingCo
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
import type { DocumentsListEntry, Document } from '../types/documents';
|
||||
import { usePreviewContext } from '../preview/PreviewContext';
|
||||
import { useAppState } from '../app/appState';
|
||||
|
||||
type TagLike = { id?: Identifier | null; label?: string; color?: string | null } | null;
|
||||
type OverlaySource = { url: string; alt?: string | null; mimeType?: string | null; };
|
||||
@@ -51,7 +52,6 @@ export interface DesktopWorkspaceProps {
|
||||
onSelectionChange?: (selectedIds: Identifier[]) => void;
|
||||
onDocumentTagAttach?: (docId: Identifier, tagId: Identifier) => void;
|
||||
onDocumentTagDetach?: (docId: Identifier, tagId: Identifier) => void;
|
||||
tenantId?: Identifier | null;
|
||||
viewId?: string | null;
|
||||
defaultCardSize?: number;
|
||||
}
|
||||
@@ -87,11 +87,12 @@ const DesktopWorkspaceContent: React.FC<DesktopWorkspaceProps> = ({
|
||||
onSelectionChange,
|
||||
onDocumentTagAttach,
|
||||
onDocumentTagDetach,
|
||||
tenantId,
|
||||
viewId,
|
||||
defaultCardSize = 200,
|
||||
}) => {
|
||||
const { openPreview } = usePreviewContext();
|
||||
const { tenant } = useAppState();
|
||||
const tenantId = tenant?.id as Identifier;
|
||||
const { addPointer, removePointer } = usePointerTracking();
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [isLayoutReady, setIsLayoutReady] = useState(false);
|
||||
|
||||
@@ -64,7 +64,6 @@ export interface UseDocumentsPanelPropsArgs {
|
||||
folderOptions?: unknown[];
|
||||
moveDocumentsToFolder?: (...args: unknown[]) => void;
|
||||
selectionValue: WorkspaceSelectionValue;
|
||||
currentTenantId?: Identifier | null;
|
||||
}
|
||||
|
||||
export type DocumentsPanelProps = ReturnType<typeof useDocumentsPanelProps>;
|
||||
@@ -118,7 +117,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
folderOptions,
|
||||
moveDocumentsToFolder,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
} = props;
|
||||
|
||||
return useMemo(
|
||||
@@ -173,7 +171,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
folderOptions,
|
||||
onMoveDocumentsToFolder: moveDocumentsToFolder,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
}),
|
||||
[
|
||||
activeCorrespondentFilters,
|
||||
@@ -223,7 +220,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
getDocumentAsset,
|
||||
folderOptions,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -81,7 +81,6 @@ export interface DocumentsViewProps {
|
||||
activeCorrespondentIdSet?: Set<Identifier> | null;
|
||||
scrollRef?: RefObject<HTMLElement | null>;
|
||||
// Desk specific (optional for now or handled via intersection)
|
||||
tenantId?: Identifier | null;
|
||||
viewId?: string | null;
|
||||
activeTagFilters?: Array<Identifier | null>;
|
||||
}
|
||||
@@ -137,7 +136,6 @@ const DocumentsPanelInner: React.FC<DocumentsPanelInnerProps> = ({
|
||||
selectedFolder = null,
|
||||
onDocumentTagAttach,
|
||||
onDocumentTagDetach,
|
||||
currentTenantId,
|
||||
}): ReactNode => {
|
||||
const {
|
||||
setFocusedEntryKey,
|
||||
@@ -464,7 +462,6 @@ const DocumentsPanelInner: React.FC<DocumentsPanelInnerProps> = ({
|
||||
scrollRef,
|
||||
activeCorrespondentIdSet: activeCorrespondentIdSet,
|
||||
onCorrespondentClick: toggleCorrespondentFilter,
|
||||
tenantId: currentTenantId,
|
||||
viewId,
|
||||
onEntryPointer,
|
||||
};
|
||||
|
||||
@@ -1191,7 +1191,6 @@ const useDocumentsWorkspace = ({
|
||||
moveDocumentsToFolder,
|
||||
selectFolder,
|
||||
selectionValue: selection,
|
||||
currentTenantId,
|
||||
});
|
||||
const documentsTableProps = useMemo(
|
||||
() => ({
|
||||
|
||||
Reference in New Issue
Block a user