feat: refactor frontend tag interaction handlers

This commit is contained in:
2025-12-09 00:03:55 +01:00
parent c38d88c209
commit 99fa12a1be
11 changed files with 63 additions and 80 deletions
@@ -14,17 +14,17 @@ import EntryTags from './EntryTags';
import FolderEntry from './FolderEntry';
import DocumentEntry from './DocumentEntry';
import { TagDragHandlers } from '../interactions/useTagInteractions';
import { TagInteractionHandlers } from '../interactions/useTagInteractions';
interface DocumentsListRowProps {
entry: DocumentsListEntry;
viewLogic: DocumentViewLogic;
iconSize?: number;
tagDragHandlers?: TagDragHandlers;
tagHandlers?: TagInteractionHandlers;
}
const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
const { entry, iconSize, tagDragHandlers } = props;
const { entry, iconSize, tagHandlers } = props;
const { ensureAssetUrl, getDocumentAsset } = useDocumentsAssetContext();
const { scrollRef, activeCorrespondentIdSet, tagLookupById } = useDocumentsViewStateContext();
const {
@@ -91,7 +91,7 @@ const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
return (
<DocumentEntry
doc={doc}
tagDragHandlers={tagDragHandlers}
tagHandlers={tagHandlers}
viewLogic={props.viewLogic}
component="tr"
className="document"
@@ -142,7 +142,7 @@ const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
tagLookupById={tagLookupById}
onTagClick={onTagClick}
doc={doc}
tagDragHandlers={logic.handlers.tagDragHandlers}
tagHandlers={logic.handlers.tagHandlers}
/>
</div>
</div>