import { ipcRenderer } from "electron" ; export const invokeBackend = ( channel , ... args ) => { console . log ( `Invoking ${ channel }` ) ; return ipcRenderer . invoke ( channel , ... args ) ; } ; export const listenBackend = ( channel , callback ) => { return ipcRenderer . on ( channel , ( _event , message ) => { console . log ( `Received ${ channel }` ) ; callback ( message ) ; } ) ; } ;