ts cleanup on some config components

This commit is contained in:
gingervitis
2021-01-29 10:26:55 -08:00
parent 84f001c344
commit 97b2e00eee
6 changed files with 77 additions and 21 deletions

View File

@ -1,7 +1,7 @@
// TODO: add a notication after updating info that changes will take place either on a new stream or server restart. may be different for each field.
import React, { useState, useEffect } from 'react';
import PropTypes, { any } from 'prop-types';
import PropTypes from 'prop-types';
import { STATUS, fetchData, FETCH_INTERVAL, SERVER_CONFIG } from './apis';
import { ConfigDetails, UpdateArgs } from '../types/config-section';
@ -50,7 +50,7 @@ export const ServerStatusContext = React.createContext({
...initialServerStatusState,
serverConfig: initialServerConfigState,
setFieldInConfigState: any,
setFieldInConfigState: (args: UpdateArgs) => { return args },
});
const ServerStatusProvider = ({ children }) => {
@ -88,7 +88,6 @@ const ServerStatusProvider = ({ children }) => {
...config,
[fieldName]: value,
};
console.log({updatedConfig, fieldName, value, path})
setConfig(updatedConfig);
};