diff --git a/src/components/pages/FileManagementPage.tsx b/src/components/pages/FileManagementPage.tsx index 57af105..0de22b9 100644 --- a/src/components/pages/FileManagementPage.tsx +++ b/src/components/pages/FileManagementPage.tsx @@ -281,38 +281,38 @@ export const FileManagementPage = () => { }; // Open file - const handleOpenFile = async (file: FileData) => { - try { - // First save the file to a temporary location - if (!window.electron || !window.electron.saveFile || !window.electron.openFile) { - console.error("Electron API not available"); - return; - } +// const handleOpenFile = async (file: FileData) => { +// try { +// // First save the file to a temporary location +// if (!window.electron || !window.electron.saveFile || !window.electron.openFile) { +// console.error("Electron API not available"); +// return; +// } - // Save file to temp location and then open it - const saveResult = await window.electron.saveFile( - file.data, - file.name, - file.type || 'application/octet-stream' - ); +// // Save file to temp location and then open it +// const saveResult = await window.electron.saveFile( +// file.data, +// file.name, +// file.type || 'application/octet-stream' +// ); - if (!saveResult.success || !saveResult.filePath) { - if (!saveResult.canceled) { - console.error("Error saving file:", saveResult.error); - } - return; - } +// if (!saveResult.success || !saveResult.filePath) { +// if (!saveResult.canceled) { +// console.error("Error saving file:", saveResult.error); +// } +// return; +// } - // Now open the file with the default application - const openResult = await window.electron.openFile(saveResult.filePath); +// // Now open the file with the default application +// const openResult = await window.electron.openFile(saveResult.filePath); - if (!openResult.success) { - console.error("Error opening file:", openResult.error); - } - } catch (error) { - console.error("Error opening file:", error); - } - }; +// if (!openResult.success) { +// console.error("Error opening file:", openResult.error); +// } +// } catch (error) { +// console.error("Error opening file:", error); +// } +// }; // Format file size const formatFileSize = (bytes: number): string => {