hide minutes when empty
This commit is contained in:
parent
5d9df0ec82
commit
c1a194fd84
@ -17,10 +17,12 @@ const formatUptime = (timestamp) => {
|
|||||||
if (days) {
|
if (days) {
|
||||||
uptimeStr += `${days}d`;
|
uptimeStr += `${days}d`;
|
||||||
}
|
}
|
||||||
if (hours || days) {
|
if (days || hours) {
|
||||||
uptimeStr += `${format(hours)}h`;
|
uptimeStr += `${format(hours)}h`;
|
||||||
}
|
}
|
||||||
uptimeStr += `${format(minutes)}m`;
|
if (days || hours || minutes) {
|
||||||
|
uptimeStr += `${format(minutes)}m`;
|
||||||
|
}
|
||||||
if (!days) {
|
if (!days) {
|
||||||
uptimeStr += `${format(seconds)}s `;
|
uptimeStr += `${format(seconds)}s `;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user