@@ -281,38 +281,38 @@ export const FileManagementPage = () => {
281281 } ;
282282
283283 // Open file
284- const handleOpenFile = async ( file : FileData ) => {
285- try {
286- // First save the file to a temporary location
287- if ( ! window . electron || ! window . electron . saveFile || ! window . electron . openFile ) {
288- console . error ( "Electron API not available" ) ;
289- return ;
290- }
284+ // const handleOpenFile = async (file: FileData) => {
285+ // try {
286+ // // First save the file to a temporary location
287+ // if (!window.electron || !window.electron.saveFile || !window.electron.openFile) {
288+ // console.error("Electron API not available");
289+ // return;
290+ // }
291291
292- // Save file to temp location and then open it
293- const saveResult = await window . electron . saveFile (
294- file . data ,
295- file . name ,
296- file . type || 'application/octet-stream'
297- ) ;
292+ // // Save file to temp location and then open it
293+ // const saveResult = await window.electron.saveFile(
294+ // file.data,
295+ // file.name,
296+ // file.type || 'application/octet-stream'
297+ // );
298298
299- if ( ! saveResult . success || ! saveResult . filePath ) {
300- if ( ! saveResult . canceled ) {
301- console . error ( "Error saving file:" , saveResult . error ) ;
302- }
303- return ;
304- }
299+ // if (!saveResult.success || !saveResult.filePath) {
300+ // if (!saveResult.canceled) {
301+ // console.error("Error saving file:", saveResult.error);
302+ // }
303+ // return;
304+ // }
305305
306- // Now open the file with the default application
307- const openResult = await window . electron . openFile ( saveResult . filePath ) ;
306+ // // Now open the file with the default application
307+ // const openResult = await window.electron.openFile(saveResult.filePath);
308308
309- if ( ! openResult . success ) {
310- console . error ( "Error opening file:" , openResult . error ) ;
311- }
312- } catch ( error ) {
313- console . error ( "Error opening file:" , error ) ;
314- }
315- } ;
309+ // if (!openResult.success) {
310+ // console.error("Error opening file:", openResult.error);
311+ // }
312+ // } catch (error) {
313+ // console.error("Error opening file:", error);
314+ // }
315+ // };
316316
317317 // Format file size
318318 const formatFileSize = ( bytes : number ) : string => {
0 commit comments