Skip to content

Commit dc05001

Browse files
Send back array of strings instead of single string
1 parent 75fcd36 commit dc05001

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

electron/routes/dashboard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ipcMain.on('addApp', (message: IpcMainEvent, application: any) => {
1818
const newApp = JSON.parse(application);
1919

2020
// Add a creation date to the application
21-
const createdOn = moment().format('lll')
22-
newApp.push(createdOn)
21+
const createdOn = moment().format('lll');
22+
newApp.push(createdOn);
2323

2424
// Add app to list of applications
2525
state.services.push(newApp);
@@ -44,7 +44,7 @@ ipcMain.on('getApps', message => {
4444
);
4545

4646
// Destructure list of services from state to be rendered on the dashboard
47-
const dashboardList = state.services.map((arr: string[]) => arr[0]);
47+
const dashboardList = state.services.map((arr: string[]) => [arr[0], arr[3], arr[4]]);
4848

4949
// Sync event - return new applications list
5050
message.returnValue = dashboardList;

0 commit comments

Comments
 (0)