From 970490d9c871ced6d2fa541e6c41674d2cb41323 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Fri, 28 Nov 2025 09:11:11 +0100 Subject: [PATCH] refactor: remove unused code and parameters from drag logic and document viewer --- frontend/src/desktop/CardDragLogic.ts | 2 +- frontend/src/preview/DocumentViewerLayout.tsx | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/desktop/CardDragLogic.ts b/frontend/src/desktop/CardDragLogic.ts index 85e9be0..deafcd1 100644 --- a/frontend/src/desktop/CardDragLogic.ts +++ b/frontend/src/desktop/CardDragLogic.ts @@ -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; diff --git a/frontend/src/preview/DocumentViewerLayout.tsx b/frontend/src/preview/DocumentViewerLayout.tsx index 652e21e..7b30ce3 100644 --- a/frontend/src/preview/DocumentViewerLayout.tsx +++ b/frontend/src/preview/DocumentViewerLayout.tsx @@ -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,