refactor: remove unused code and parameters from drag logic and document viewer

This commit is contained in:
2025-11-28 09:11:11 +01:00
parent 65ad1f6cfa
commit 970490d9c8
2 changed files with 1 additions and 10 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export const handleDragStart = (store: LayoutStore, selection: string[], leading
});
};
export const attachToDragGroup = (store: LayoutStore, selection: string[], leadingId: string, pointerId: number) => {
export const attachToDragGroup = (store: LayoutStore, selection: string[], leadingId: string, _pointerId: number) => {
const leadingCard = store.items.get(leadingId);
if (!leadingCard || !leadingCard.physics.isDragging) return;
@@ -3,7 +3,6 @@ import type { JSX } from 'react';
import DocumentInfoPanel from '../documents/DocumentInfoPanel';
import PdfViewer from './PdfViewer';
import MediaViewer from './MediaViewer';
import { AUDIO_EXTENSIONS, VIDEO_EXTENSIONS } from '../constants/preview';
import type { Document } from '../types/documents';
@@ -42,14 +41,6 @@ interface DocumentViewerLayoutProps {
layoutMode?: LayoutMode;
}
const getFileExtension = (filename?: string | null) => {
if (!filename) {
return '';
}
const match = filename.toLowerCase().match(/\.([a-z0-9]+)$/);
return match ? match[1] : '';
};
const DocumentViewerLayout = ({
document,
documentLink,