Fixed a bug in the ServerInfo.jsx

This commit is contained in:
2024-02-15 17:11:56 +01:00
parent aad8dd083b
commit 11761b6487

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 (