fix timeSinceLastCheck
This commit is contained in:
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"}
|
||||
/>
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user