set initial state explicitly to for consistency
This commit is contained in:
1 parent
ef28f8c38b
commit
12711e87ee
2 files changed
+4
-3
No files matched your search
@@ -2,6 +2,7 @@ import { useTheme } from "@mui/material";
|
||||
|
||||
const useUtils = () => {
|
||||
const determineState = (monitor) => {
|
||||
if (typeof monitor === "undefined") return "pending";
|
||||
if (monitor.isActive === false) return "paused";
|
||||
if (monitor?.status === undefined) return "pending";
|
||||
return monitor?.status == true ? "up" : "down";
|
||||
|
||||
Reference in new issue
Block a user