diff --git a/src/components/navigator/FilePanel.tsx b/src/components/navigator/FilePanel.tsx index 669baa9..5effc96 100644 --- a/src/components/navigator/FilePanel.tsx +++ b/src/components/navigator/FilePanel.tsx @@ -127,6 +127,7 @@ const FilePanel = forwardRef< } }, [onDrop, nav.selectedRemote, nav.cwd]) + // biome-ignore lint/correctness/useExhaustiveDependencies: <> useEffect(() => { if (onSelectionChange) { onSelectionChange(nav.getSelection()) @@ -253,10 +254,6 @@ const FilePanel = forwardRef< [onDrop] ) - const handleContextMenu = useCallback((entry: Entry, event: React.MouseEvent) => { - // Context menu is handled at the Browser level - }, []) - const handlePreviewClick = useCallback( (entry: Entry) => { if (entry.isDir) return @@ -328,7 +325,8 @@ const FilePanel = forwardRef< onDownload={onDownload} draggable={selectionMode === 'drag' || selectionMode === 'both'} onDragStart={handleDragStartInternal} - onContextMenu={contextMenuItems ? handleContextMenu : undefined} + // handled at the Browser level + onContextMenu={contextMenuItems ? () => {} : undefined} favoritedKeys={nav.favoritedKeys} onToggleFavorite={handleToggleFavorite} listHeight={listHeight} diff --git a/src/pages/Commander.tsx b/src/pages/Commander.tsx index 4841614..719baf1 100644 --- a/src/pages/Commander.tsx +++ b/src/pages/Commander.tsx @@ -229,28 +229,13 @@ export default function Browser() { { - if (key === 'preview' && !contextMenu.entry.isDir) { - setPreviewItem(contextMenu.entry) - } else if (key === 'copy-path') { + if (key === 'copy-path') { navigator.clipboard.writeText(contextMenu.entry.fullPath) - } else if (key === 'info') { - setPreviewItem(contextMenu.entry) } closeContextMenu() }} > - {contextMenu.entry.isDir ? ( - <> - Copy Path - Get Info - - ) : ( - <> - Preview - Copy Path - Get Info - - )} + Copy Path