diff --git a/web/pages/index.tsx b/web/pages/index.tsx index e1c8f9b42..e17a5dbf0 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -54,12 +54,11 @@ export default function Stats() { // Pull in the server config so we can show config overview. - const [videoSettings, setVideoSettings] = useState([]); + const [config, setConfig] = useState([]); const getConfig = async () => { try { const result = await fetchData(SERVER_CONFIG); - const variants = result && result.videoSettings && result.videoSettings.videoQualityVariants; - setVideoSettings(variants); + setConfig(result); } catch (error) { console.log(error); } @@ -71,7 +70,7 @@ export default function Stats() { getConfig(); }, []); - if (!stats || isEmptyObject(stats)) { + if (isEmptyObject(config) || isEmptyObject(stats)) { return (