diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx index 3a32ff74c..d42b3e434 100644 --- a/resources/scripts/components/dashboard/ServerRow.tsx +++ b/resources/scripts/components/dashboard/ServerRow.tsx @@ -44,12 +44,9 @@ export default ({ server, className }: { server: Server; className?: string }) = const [ isSuspended, setIsSuspended ] = useState(server.isSuspended); const [ stats, setStats ] = useState(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);