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 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"}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user