@@ -7,6 +7,8 @@ import React, { useContext, useEffect, useState } from 'react';
77import { DashboardContext } from '../../context/DashboardContext'
88import { ApplicationContext } from '../../context/ApplicationContext' ;
99import './ServicesModal.scss' ;
10+ import lightAndDark from '../../components/Styling' ;
11+
1012
1113import ServicesLink from './ServicesLink' ;
1214
@@ -20,6 +22,8 @@ interface ServicesModalProps {
2022// v10: Seems to never have been updated for cloud-based info...
2123// servicesModal is re-rendered depending on i and application passed in...
2224const ServicesModal : React . FC < ServicesModalProps > = React . memo ( ( { i, app } ) => {
25+ const { mode } = useContext ( DashboardContext ) ;
26+ const currentStyle = mode === 'light' ? lightAndDark . lightModeData : lightAndDark . darkModeData ;
2327 //console.log('Hi, inside ServicesModal. Memoize function invoked in ServicesModal.');
2428 //console.log('ServicesModal current props (index, app): ', i, ' ', app);
2529
@@ -44,7 +48,7 @@ const ServicesModal: React.FC<ServicesModalProps> = React.memo(({ i, app }) => {
4448
4549
4650 return (
47- < div className = "servicesContainer" >
51+ < div className = "servicesContainer" style = { currentStyle } >
4852 { ! servicesData . length ? (
4953 < div className = "loadingMessageModal" >
5054 < h2 id = "loadingMessage" > Loading...</ h2 >
@@ -56,6 +60,7 @@ const ServicesModal: React.FC<ServicesModalProps> = React.memo(({ i, app }) => {
5660 < p > Select a server to monitor</ p >
5761 </ div >
5862 < ServicesLink
63+
5964 app = { app }
6065 servicesData = { servicesData }
6166 services = { services }
0 commit comments