From d1077a1314e25ea5ce38f8510abfb88f2dd157e5 Mon Sep 17 00:00:00 2001 From: mannilakash Date: Fri, 13 Mar 2026 12:07:14 -0400 Subject: [PATCH] fix: changing spacing to constants --- .../Components/InfrastructureMetrics.tsx | 12 +++++------ .../Status/Components/MonitorsList.tsx | 21 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx b/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx index 3dafdadc5..9be17105c 100644 --- a/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx +++ b/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx @@ -8,6 +8,7 @@ import type { Monitor } from "@/Types/Monitor"; import Grid from "@mui/material/Grid"; import useMediaQuery from "@mui/material/useMediaQuery"; import Box from "@mui/material/Box"; +import { LAYOUT, SPACING } from "@/Utils/Theme/constants"; interface StatusPageMonitor extends Monitor { checks?: Monitor["recentChecks"]; @@ -56,15 +57,14 @@ const MetricItem = ({ label, progress, details }: MetricItemProps) => { flexDirection: "column", alignItems: "center", textAlign: "center", - gap: theme.spacing(2), - padding: theme.spacing(2), - paddingBottom: theme.spacing(4), + gap: theme.spacing(SPACING.LG), + padding: theme.spacing(LAYOUT.XS), borderRight: isSmall ? "none" : `1px solid ${theme.palette.divider}`, borderBottom: isSmall ? `1px solid ${theme.palette.divider}` : "none", "&:last-child": { borderRight: "none", borderBottom: "none", - paddingBottom: theme.spacing(2), + paddingBottom: theme.spacing(SPACING.LG), }, }} > @@ -83,7 +83,7 @@ const MetricItem = ({ label, progress, details }: MetricItemProps) => { {details && details.length > 0 && ( {details.map((detail) => ( {metrics.map( ({ key, labelKey, hasData, progress, details }) => diff --git a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx b/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx index 3cda8888e..c9212f0c4 100644 --- a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx +++ b/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx @@ -13,6 +13,7 @@ import { useState } from "react"; import type { Monitor } from "@/Types/Monitor"; import type { StatusPage } from "@/Types/StatusPage"; import type { RootState } from "@/Types/state"; +import { LAYOUT, SPACING } from "@/Utils/Theme/constants"; interface StatusPageMonitor extends Monitor { checks?: Monitor["recentChecks"]; @@ -60,7 +61,7 @@ const getMonitorBadgeStyles = (monitorType: string, theme: Theme) => { return { backgroundColor: config.bg, color: config.color, - padding: `${theme.spacing(1)} ${theme.spacing(2)}`, + padding: `${theme.spacing(SPACING.SM)} ${theme.spacing(SPACING.LG)}`, borderRadius: theme.shape.borderRadius, }; }; @@ -90,11 +91,11 @@ const MonitorContent = ({ } return ( - + {chartType === "histogram" ? ( ) : ( @@ -113,12 +114,12 @@ export const MonitorsList = ({ statusPage, monitors }: MonitorsListProps) => { const [chartType, setChartType] = useState<"histogram" | "heatmap">("histogram"); return ( - + {statusPage.showCharts && ( {t("pages.statusPages.monitorsList.chartTypeHeatmap")} { return (