forked from Alex/Pterodactyl-Panel
Thanks for that highlight phpstorm...
This commit is contained in:
parent
283cb08e33
commit
31ad238e8b
@ -44,12 +44,9 @@ export default ({ server, className }: { server: Server; className?: string }) =
|
||||
const [ isSuspended, setIsSuspended ] = useState(server.isSuspended);
|
||||
const [ stats, setStats ] = useState<ServerStats | null>(null);
|
||||
|
||||
const getStats = () => {
|
||||
setStatsError(false);
|
||||
return getServerResourceUsage(server.uuid)
|
||||
.then(data => setStats(data))
|
||||
.catch(error => console.error(error));
|
||||
};
|
||||
const getStats = () => getServerResourceUsage(server.uuid)
|
||||
.then(data => setStats(data))
|
||||
.catch(error => console.error(error));
|
||||
|
||||
useEffect(() => {
|
||||
setIsSuspended(stats?.isSuspended || server.isSuspended);
|
||||
|
Loading…
Reference in New Issue
Block a user