feat: abstracting table pagination

This commit is contained in:
Caio Cabral committed 2024-11-27 17:38:39 -05:00
1 parent 4bfe522f7d
commit fd278d3a97
8 files changed
+350 -329

No files matched your search

+3 -1
View File
@@ -1,13 +1,15 @@
import { useTheme } from "@mui/material";
const useUtils = () => {
const theme = useTheme();
const determineState = (monitor) => {
if (monitor.isActive === false) return "paused";
if (monitor?.status === undefined) return "pending";
return monitor?.status == true ? "up" : "down";
};
/* TODO Refactor: from here on shouldn't live in a custom hook, but on theme, or constants */
const theme = useTheme();
const statusColor = {
up: theme.palette.success.main,
down: theme.palette.error.main,