some cleanup

This commit is contained in:
Ginger Wong
2020-10-22 17:16:28 -07:00
parent a062856726
commit 00fd087fde
9 changed files with 76 additions and 38 deletions

View File

@@ -1,7 +1,12 @@
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, useContext } from 'react';
import { SERVER_CONFIG, fetchData, FETCH_INTERVAL } from './utils/apis';
import { BroadcastStatusContext } from './utils/broadcast-status-context';
export default function ServerConfig() {
const context = useContext(BroadcastStatusContext);
const { broadcastActive } = context || {};
const [clients, setClients] = useState({});
const getInfo = async () => {