feat: Introduce DocumentOpenContext for document activation in the frontend
This commit is contained in:
@@ -3,7 +3,6 @@ import { useDocumentViewLogic, DocumentViewLogic } from './hooks/useDocumentView
|
||||
import { useDocumentsNavigation } from './hooks/useDocumentsNavigation';
|
||||
import { useWorkspaceSelectionContext } from '../app/WorkspaceSelectionContext';
|
||||
import { usePanelManager } from '../app/PanelManagerContext';
|
||||
import { usePreviewContext } from '../preview/PreviewContext';
|
||||
import DocumentsListRow from './components/DocumentsListRow';
|
||||
import DocumentsGridCard from './components/DocumentsGridCard';
|
||||
import DocumentsListContainer from './components/DocumentsListContainer';
|
||||
@@ -24,7 +23,6 @@ const AbstractDocumentsView = <CProps extends { clearSelection: () => void; chil
|
||||
...props
|
||||
}: AbstractDocumentsViewProps<CProps>) => {
|
||||
const { entries, onDocumentRename, onFolderRename, onFolderSelect, scrollRef, viewId } = props;
|
||||
const { openPreview } = usePreviewContext();
|
||||
const viewLogic = useDocumentViewLogic({
|
||||
onDocumentRename,
|
||||
onFolderRename,
|
||||
@@ -32,7 +30,6 @@ const AbstractDocumentsView = <CProps extends { clearSelection: () => void; chil
|
||||
const { handleKeyDown, handleFocus } = useDocumentsNavigation({
|
||||
entries,
|
||||
onFolderSelect,
|
||||
onPreview: openPreview,
|
||||
viewMode: props.viewMode,
|
||||
scrollRef: props.scrollRef,
|
||||
});
|
||||
@@ -105,7 +102,6 @@ const AbstractDocumentsView = <CProps extends { clearSelection: () => void; chil
|
||||
entry={entry}
|
||||
viewLogic={viewLogic}
|
||||
{...props}
|
||||
onPreview={openPreview}
|
||||
/>
|
||||
))}
|
||||
</ContainerComponent>
|
||||
|
||||
Reference in New Issue
Block a user