Skip to content

Commit 3ee80bf

Browse files
committed
Added comments
1 parent 3beaac0 commit 3ee80bf

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

app/components/ServicesDashboard.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ import SetupContext from '../context/SetupContext';
55
import AddService from './AddService.jsx';
66

77
const ServicesDashboard = (props) => {
8+
// Used to toggle setup required if user wants to add a new database.
89
const setup = useContext(SetupContext);
10+
11+
// List of the databases saved by users to track microservices.
912
const serviceList = useContext(DashboardContext);
13+
14+
// Used to hold the buttons created for each database found in context.
1015
const [serviceSelected, setSelection] = useState();
1116

17+
// Creates button for each database in dashboard context.
1218
const renderServiceList = (context) => {
1319
const buttonStore = [];
1420
for (let i = 0; i < context.length; i += 1) {

app/context/DashboardContext.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22

33
const { ipcRenderer } = window.require('electron');
44

5+
// Contains an array of just the names of the databases saved by the user.
56
const DashboardContext = React.createContext(ipcRenderer.sendSync('dashboard'));
67

78
export const DashboardProvider = DashboardContext.Provider;

0 commit comments

Comments
 (0)