mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-06 07:22:07 +08:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
@@ -13,7 +13,7 @@ export default function Uptime({ refresh = 1500 }) {
|
||||
});
|
||||
|
||||
if (error || data?.error) {
|
||||
return <Error />
|
||||
return <Error />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
@@ -21,9 +21,9 @@ export default function Uptime({ refresh = 1500 }) {
|
||||
}
|
||||
|
||||
const mo = Math.floor(data.uptime / (3600 * 24 * 31));
|
||||
const d = Math.floor(data.uptime % (3600 * 24 * 31) / (3600 * 24));
|
||||
const h = Math.floor(data.uptime % (3600 * 24) / 3600);
|
||||
const m = Math.floor(data.uptime % 3600 / 60);
|
||||
const d = Math.floor((data.uptime % (3600 * 24 * 31)) / (3600 * 24));
|
||||
const h = Math.floor((data.uptime % (3600 * 24)) / 3600);
|
||||
const m = Math.floor((data.uptime % 3600) / 60);
|
||||
|
||||
let uptime;
|
||||
if (mo > 0) uptime = `${mo}${t("resources.months")} ${d}${t("resources.days")}`;
|
||||
|
||||
Reference in New Issue
Block a user