@@ -41,12 +41,12 @@ const ApplicationContextProvider: React.FC<AppContextProps> = React.memo(props =
4141 // console.log('app when fetch services name: ', application);
4242 ipcRenderer . send ( 'servicesRequest' ) ;
4343 ipcRenderer . on ( 'servicesResponse' , ( event : Electron . Event , data : any ) => {
44+ //data here refers to the data coming the services document of the database
4445 let result : any ;
4546 result = JSON . parse ( data ) ;
4647 console . log ( 'result from ipcrenderer services response is: ' , result ) ;
4748 // console.log('Calling setServicesData passing in above result. Current servicesData is the following: ', servicesData);
4849 setServicesData ( result ) ;
49- // console.log('Leaving fetchedServicesNames function.');
5050 ipcRenderer . removeAllListeners ( 'servicesResponse' ) ;
5151 } ) ;
5252
@@ -61,6 +61,7 @@ const ApplicationContextProvider: React.FC<AppContextProps> = React.memo(props =
6161 */
6262 const connectToDB = useCallback ( ( username : string , index : number , application : string , URI : string , databaseType : string ) => {
6363 console . log ( 'Hi, inside ApplicationContext, connectToDB function was invoked.' ) ;
64+ /* ipcRenderer is referring to electron. The connect string is processed in data.ts inside of the electron folder at the root of the project */
6465 ipcRenderer . removeAllListeners ( 'databaseConnected' ) ;
6566 ipcRenderer . send ( 'connect' , username , index , URI , databaseType ) ;
6667 ipcRenderer . on ( 'databaseConnected' , ( event : Electron . Event , data : any ) => {
0 commit comments