tighten streak time coniditional
This commit is contained in:
1 parent
6f7fba5ae5
commit
564b356115
1 file changed
+1
-4
@@ -25,10 +25,7 @@ export const MonitorStatBoxes = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const timeOfLastFailure = monitorStats?.timeOfLastFailure || 0;
|
const timeOfLastFailure = monitorStats?.timeOfLastFailure || 0;
|
||||||
const timeSinceLastFailure =
|
const timeSinceLastFailure = timeOfLastFailure > 0 ? Date.now() - timeOfLastFailure : 0;
|
||||||
timeOfLastFailure > 0
|
|
||||||
? Date.now() - timeOfLastFailure
|
|
||||||
: Date.now() - new Date(monitorStats?.createdAt || 0).getTime();
|
|
||||||
|
|
||||||
// Determine time since last check
|
// Determine time since last check
|
||||||
const timeOfLastCheck = monitorStats?.lastCheckTimestamp || 0;
|
const timeOfLastCheck = monitorStats?.lastCheckTimestamp || 0;
|
||||||
|
|||||||
Reference in new issue
Block a user