mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
fix uptime hours pluralization
This commit is contained in:
@@ -191,7 +191,8 @@ export default function SystemDetail({ name }: { name: string }) {
|
||||
}
|
||||
let uptime: number | string = system.info.u
|
||||
if (system.info.u < 172800) {
|
||||
uptime = `${Math.trunc(uptime / 3600)} hours`
|
||||
const hours = Math.trunc(uptime / 3600)
|
||||
uptime = `${hours} hour${hours > 1 ? 's' : ''}`
|
||||
} else {
|
||||
uptime = `${Math.trunc(system.info?.u / 86400)} days`
|
||||
}
|
||||
|
Reference in New Issue
Block a user