refactor: remove unused code and parameters from drag logic and document viewer
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user