Fixed a bug in the ServerInfo.jsx

This commit is contained in:
Mathias Wagner 2024-02-15 17:11:56 +01:00
parent aad8dd083b
commit 11761b6487
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -17,12 +17,13 @@ export const ServerInfo = ({status, uuid, serverInfo, setServerInfo, setAlert})
}
useEffect(() => {
if (status !== "ONLINE") return;
updateServerInfo();
const interval = setInterval(() => updateServerInfo(), 5000);
return () => clearInterval(interval);
}, []);
}, [status]);
return (