1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 17:12:30 +01:00

Merge branch 'develop' into pr/2434

This commit is contained in:
Dane Everitt 2020-10-31 13:55:56 -07:00
commit abb043c1cc
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -41,7 +41,6 @@ const StatusIndicatorBox = styled(GreyRowBox)<{ $status: ServerPowerState | unde
export default ({ server, className }: { server: Server; className?: string }) => {
const interval = useRef<number>(null);
const [ statsError, setStatsError ] = useState(false);
const [ isSuspended, setIsSuspended ] = useState(server.isSuspended);
const [ stats, setStats ] = useState<ServerStats | null>(null);
@ -49,10 +48,7 @@ export default ({ server, className }: { server: Server; className?: string }) =
setStatsError(false);
return getServerResourceUsage(server.uuid)
.then(data => setStats(data))
.catch(error => {
setStatsError(true);
console.error(error);
});
.catch(error => console.error(error));
};
useEffect(() => {