fix timeSinceLastCheck

This commit is contained in:
Alex Holliday committed 2025-03-07 11:14:40 -08:00
1 parent fec89bc680
commit 94f4d63e96
1 file changed
+1 -6
@@ -9,11 +9,6 @@ import PropTypes from "prop-types";
const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
const theme = useTheme();
let timeSinceLastCheck = 0;
if (monitor?.lastCheckTimestamp) {
timeSinceLastCheck = Date.now() - monitor?.lastCheckTimestamp;
}
return (
<Stack
@@ -37,7 +32,7 @@ const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
heading={"Last check"}
subHeading={
<LastUpdate
lastUpdateTime={timeSinceLastCheck}
lastUpdateTime={monitor?.timeSinceLastCheck}
suffix={"seconds ago"}
/>
}