@@ -17,7 +17,7 @@ export const DashboardContext = createContext<any>(null);
17
17
18
18
/**
19
19
* MANAGES THE FOLLOWING DATA AND ACTIONS:
20
- * @property {Array } applications List of all applications, their description and creation date
20
+ * @property {Array } applications List of all applications, their description, database type and creation date
21
21
* @method getApplications
22
22
* @method addApp
23
23
* @method deleteApp
@@ -29,7 +29,7 @@ const DashboardContextProvider = React.memo(({ children }: Props) => {
29
29
/**
30
30
* Sends a request for all existing applications belonging to a user
31
31
* and sets the applications state to the list of app names
32
- * Also sends a request for the previously saved theme/mode
32
+ * Also sends a request for the previously saved theme/mode
33
33
* and sets the mode state to the retrieved settings
34
34
*/
35
35
const getApplications = useCallback ( ( ) => {
@@ -61,22 +61,21 @@ const DashboardContextProvider = React.memo(({ children }: Props) => {
61
61
const result = ipcRenderer . sendSync ( 'deleteApp' , index ) ;
62
62
setApplications ( result ) ;
63
63
} , [ ] ) ;
64
-
64
+
65
65
/**
66
66
* Sends a synchronous request to change the current mode/theme using a provided
67
67
* string. The string is use to locate the desired mode info in settings.json in
68
68
* the backend. Updates mode/theme.
69
69
*/
70
70
71
71
const changeMode = useCallback ( ( currMode : string ) => {
72
- const result = ipcRenderer . sendSync (
73
- 'changeMode' ,
74
- currMode
75
- ) ;
72
+ const result = ipcRenderer . sendSync ( 'changeMode' , currMode ) ;
76
73
setMode ( result ) ;
77
- } , [ ] )
74
+ } , [ ] ) ;
78
75
return (
79
- < DashboardContext . Provider value = { { applications, getApplications, addApp, deleteApp, mode, changeMode} } >
76
+ < DashboardContext . Provider
77
+ value = { { applications, getApplications, addApp, deleteApp, mode, changeMode } }
78
+ >
80
79
{ children }
81
80
</ DashboardContext . Provider >
82
81
) ;
0 commit comments