Show UptimeDuration for starting servers (#4284)

This commit is contained in:
Aspect 2022-10-04 22:12:07 -04:00 committed by GitHub
parent 7b91c38396
commit d7b387be3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,12 +98,12 @@ const ServerDetailsBlock = ({ className }: { className?: string }) => {
title={'Uptime'}
color={getBackgroundColor(status === 'running' ? 0 : status !== 'offline' ? 9 : 10, 10)}
>
{status === 'starting' || status === 'stopping' ? (
capitalize(status)
{status === null ? (
"Offline"
) : stats.uptime > 0 ? (
<UptimeDuration uptime={stats.uptime / 1000} />
) : (
'Offline'
capitalize(status)
)}
</StatBlock>
<StatBlock icon={faMicrochip} title={'CPU Load'} color={getBackgroundColor(stats.cpu, limits.cpu)}>