diff --git a/client/src/Components/v2/design-elements/Breadcrumb.tsx b/client/src/Components/v2/design-elements/Breadcrumb.tsx
index 8ecfd6ec6..ae3e768c2 100644
--- a/client/src/Components/v2/design-elements/Breadcrumb.tsx
+++ b/client/src/Components/v2/design-elements/Breadcrumb.tsx
@@ -4,6 +4,7 @@ import { Link, useLocation } from "react-router-dom";
import { useTheme } from "@mui/material/styles";
import { ChevronRight } from "lucide-react";
import { useTranslation } from "react-i18next";
+import type { ReactNode } from "react";
const isId = (segment: string): boolean => {
return segment.length === 24 || /^[a-f0-9-]{36}$/.test(segment);
@@ -11,6 +12,29 @@ const isId = (segment: string): boolean => {
const actionSegments = ["create", "configure"];
+const BreadcrumbWrapper = ({ children }: { children: ReactNode }) => {
+ const theme = useTheme();
+ return (
+
+ }
+ sx={{
+ fontSize: "14px",
+ marginBottom: theme.spacing(6),
+ "& .MuiBreadcrumbs-separator": {
+ color: theme.palette.text.secondary,
+ },
+ }}
+ >
+ {children}
+
+ );
+};
+
export const Breadcrumb = ({
breadcrumbOverride,
}: {
@@ -28,21 +52,7 @@ export const Breadcrumb = ({
// If override has items, render them directly
if (breadcrumbOverride !== undefined && breadcrumbOverride.length > 0) {
return (
-
- }
- sx={{
- fontSize: "14px",
- marginBottom: theme.spacing(6),
- "& .MuiBreadcrumbs-separator": {
- color: theme.palette.text.secondary,
- },
- }}
- >
+
{breadcrumbOverride.map((item, index) => {
const isLast = index === breadcrumbOverride.length - 1;
return (
@@ -58,7 +68,7 @@ export const Breadcrumb = ({
);
})}
-
+
);
}
@@ -73,8 +83,8 @@ export const Breadcrumb = ({
const basePage = segments[0] || t("common.breadcrumbs.home");
const secondSegment = segments[1];
- const isActionPage = secondSegment && actionSegments.includes(secondSegment); // create/config
- const isDetailsPage = secondSegment && isId(secondSegment); // details
+ const isActionPage = secondSegment && actionSegments.includes(secondSegment);
+ const isDetailsPage = secondSegment && isId(secondSegment);
const hasSubPage = isActionPage || isDetailsPage;
const getSubPageLabel = (): string => {
@@ -85,21 +95,7 @@ export const Breadcrumb = ({
};
return (
-
- }
- sx={{
- fontSize: "14px",
- marginBottom: theme.spacing(6),
- "& .MuiBreadcrumbs-separator": {
- color: theme.palette.text.secondary,
- },
- }}
- >
+
{hasSubPage ? (
)}
-
+
);
};
diff --git a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx b/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx
index 4d49912de..fca54ae4f 100644
--- a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx
+++ b/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx
@@ -67,8 +67,8 @@ export const MonitorsList = ({ statusPage, monitors }: MonitorsListProps) => {
gap={theme.spacing(4)}
mb={statusPage.showCharts !== false ? theme.spacing(4) : 0}
>
-
- {monitor.name}
+
+ {monitor.name}
{showURL && (
{
/>
{statusPage.showCharts !== false && (
-
+
{chartType === "histogram" ? (