FIX-1725 minor UI changes.

This commit is contained in:
Owaise Imdad committed 2025-03-03 23:12:17 +05:30
1 parent d3a769b638
commit da64cd0a56
2 files changed
+53 -20

No files matched your search

@@ -3,6 +3,7 @@ import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { formatDateWithTz } from "../../../Utils/timeUtils";
import { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import Bar from "../Bar";
/* TODO add prop validation and jsdocs */
const StatusPageBarChart = ({ checks = [] }) => {
@@ -24,21 +25,6 @@ const StatusPageBarChart = ({ checks = [] }) => {
checks = [...checks, ...placeholders];
}
const BarBox = ({ width, height, backgroundColor, borderRadius, children }) => (
<Box
marginRight="5px"
position="relative"
width={width}
height={height}
backgroundColor={backgroundColor}
sx={{
borderRadius: borderRadius || theme.spacing(1.5),
}}
>
{children}
</Box>
);
return (
<Stack
direction="row"
@@ -56,9 +42,9 @@ const StatusPageBarChart = ({ checks = [] }) => {
/* TODO what is the purpose of this box? */
// CAIO_REVIEW the purpose of this box is to make sure there are always at least 25 bars
// even if there are less than 25 checks
<BarBox
<Bar
key={`${check}-${index}`}
width="calc(30rem / 25)"
width="calc(85% / 25)"
height="100%"
backgroundColor={theme.palette.primary.lowContrast}
/>
@@ -151,8 +137,8 @@ const StatusPageBarChart = ({ checks = [] }) => {
},
}}
>
<BarBox
width="calc(30rem / 25)"
<Bar
width="calc(85% / 25)"
height="100%"
backgroundColor={theme.palette.primary.lowContrast}
>
@@ -171,7 +157,7 @@ const StatusPageBarChart = ({ checks = [] }) => {
transition: "height 600ms cubic-bezier(0.4, 0, 0.2, 1)",
}}
/>
</BarBox>
</Bar>
</Tooltip>
)
)}