cleaning unused code

This commit is contained in:
Caio Cabral committed 2025-01-14 08:36:48 -05:00
1 parent 5e9629ee29
commit d54272ba30
5 files changed
+6 -10

No files matched your search

@@ -104,7 +104,6 @@ const NewPasswordConfirmed = () => {
</Box> </Box>
<Button <Button
variant="contained" variant="contained"
color="accent"
onClick={() => navigate("/uptime")} onClick={() => navigate("/uptime")}
sx={{ sx={{
width: "100%", width: "100%",
@@ -259,6 +259,7 @@ function Infrastructure() {
rowSX: { rowSX: {
cursor: "pointer", cursor: "pointer",
"&:hover": { "&:hover": {
/* TODO check */
backgroundColor: "red" /* theme.palette.background.accent */, backgroundColor: "red" /* theme.palette.background.accent */,
}, },
}, },
@@ -19,14 +19,6 @@ const UpBarChart = memo(({ monitor, type, onBarHover }) => {
const [chartHovered, setChartHovered] = useState(false); const [chartHovered, setChartHovered] = useState(false);
const [hoveredBarIndex, setHoveredBarIndex] = useState(null); const [hoveredBarIndex, setHoveredBarIndex] = useState(null);
/* const getColorRange = (responseTime) => {
return responseTime < 200
? { main: theme.palette.success.main, light: theme.palette.success.light }
: responseTime < 300
? { main: theme.palette.warning.main, light: theme.palette.warning.light }
: { main: theme.palette.error.main, light: theme.palette.error.light };
}; */
return ( return (
<ResponsiveContainer <ResponsiveContainer
width="100%" width="100%"
+2
View File
@@ -41,6 +41,7 @@ const UptimeMonitors = () => {
const theme = useTheme(); const theme = useTheme();
const navigate = useNavigate(); const navigate = useNavigate();
const isAdmin = useIsAdmin(); const isAdmin = useIsAdmin();
const authState = useSelector((state) => state.auth); const authState = useSelector((state) => state.auth);
const fetchParams = useMemo( const fetchParams = useMemo(
@@ -65,6 +66,7 @@ const UptimeMonitors = () => {
? "0" ? "0"
: (monitor.uptimePercentage * 100).toFixed(2); : (monitor.uptimePercentage * 100).toFixed(2);
/* TODO check */
percentageColor = percentageColor =
monitor.uptimePercentage < 0.25 monitor.uptimePercentage < 0.25
? "red" /* theme.palette.percentage.uptimePoor */ ? "red" /* theme.palette.percentage.uptimePoor */
+3 -1
View File
@@ -29,7 +29,9 @@ const useUtils = () => {
paused: "Paused", paused: "Paused",
}; };
/* This is used on /*
TODO
This is used on
1) Details > Gradient card */ 1) Details > Gradient card */
/* These are rediections. We should do something that maps up to success, down to error, and get the theme by that /* These are rediections. We should do something that maps up to success, down to error, and get the theme by that
See Client\src\Components\Label\index.jsx See Client\src\Components\Label\index.jsx