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 StatBoxes = ({ monitor, lastUpdateTrigger }) => {
const theme = useTheme(); const theme = useTheme();
let timeSinceLastCheck = 0;
if (monitor?.lastCheckTimestamp) {
timeSinceLastCheck = Date.now() - monitor?.lastCheckTimestamp;
}
return ( return (
<Stack <Stack
@@ -37,7 +32,7 @@ const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
heading={"Last check"} heading={"Last check"}
subHeading={ subHeading={
<LastUpdate <LastUpdate
lastUpdateTime={timeSinceLastCheck} lastUpdateTime={monitor?.timeSinceLastCheck}
suffix={"seconds ago"} suffix={"seconds ago"}
/> />
} }