11/* eslint-disable no-console */
22/* eslint-disable no-throw-literal */
33import React , { useState , createContext , useCallback } from 'react' ;
4+ import { ApplicationContext } from './ApplicationContext' ;
45const { ipcRenderer } = window . require ( 'electron' ) ;
56
67interface IFields {
@@ -27,6 +28,7 @@ interface AwsFields {
2728
2829export const DashboardContext = createContext < any > ( null ) ;
2930
31+
3032/**
3133 * MANAGES THE FOLLOWING DATA AND ACTIONS:
3234 * @property {Array } applications List of all applications, their description, database type and creation date
@@ -42,6 +44,7 @@ const DashboardContextProvider = React.memo((props: any) => {
4244 const children = props . children ;
4345
4446 // Initial user will always be the guest
47+
4548 const [ user , setUser ] = useState < string > ( 'guest' ) ;
4649 const [ applications , setApplications ] = useState < string [ ] [ ] > ( [ ] ) ;
4750 // console.log({applications})
@@ -61,6 +64,7 @@ const DashboardContextProvider = React.memo((props: any) => {
6164 JSON . stringify ( [ name , database , URI , description , typeOfService ] )
6265 ) ;
6366 setApplications ( result ) ;
67+ console . log ( { result} )
6468 // console.log('the current application that was added is : ', result);
6569 } , [ ] ) ;
6670
0 commit comments