Added a constant and utilised a responsive-values in MUI.

This commit is contained in:
Owaise Imdad committed 2025-03-04 15:53:40 +05:30
1 parent f3537131ef
commit c5326e5d6a
1 file changed
+7 -2
@@ -49,6 +49,11 @@ const StatusPageBarChart = ({ checks = [] }) => {
const [animate, setAnimate] = useState(false);
const uiTimezone = useSelector((state) => state.ui.timezone);
const barWidth = {
xs: "calc(60% / 25)",
xl: "calc(40% / 25)",
};
useEffect(() => {
setAnimate(true);
}, []);
@@ -82,7 +87,7 @@ const StatusPageBarChart = ({ checks = [] }) => {
// even if there are less than 25 checks
<Bar
key={`${check}-${index}`}
width="calc(60% / 25)"
width={barWidth}
height="100%"
backgroundColor={theme.palette.primary.lowContrast}
/>
@@ -176,7 +181,7 @@ const StatusPageBarChart = ({ checks = [] }) => {
}}
>
<Bar
width="calc(60% / 25)"
width={barWidth}
height="100%"
backgroundColor={theme.palette.primary.lowContrast}
>