From 1166da1ab00a3a8480df049a99767e5e91d11137 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 26 Feb 2025 14:00:51 -0800 Subject: [PATCH] fix breadcrumbs --- src/Pages/DistributedUptime/Create/index.jsx | 5 +++-- src/Pages/DistributedUptimeStatus/Create/index.jsx | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Pages/DistributedUptime/Create/index.jsx b/src/Pages/DistributedUptime/Create/index.jsx index 7f18123cd..57160d2ab 100644 --- a/src/Pages/DistributedUptime/Create/index.jsx +++ b/src/Pages/DistributedUptime/Create/index.jsx @@ -42,8 +42,9 @@ const CreateDistributedUptime = () => { const { monitorId } = useParams(); const isCreate = typeof monitorId === "undefined"; - const BREADCRUMBS = [ + let BREADCRUMBS = [ { name: `distributed uptime`, path: "/distributed-uptime" }, + ...(isCreate ? [] : [{ name: "details", path: `/distributed-uptime/${monitorId}` }]), { name: isCreate ? "create" : "configure", path: `` }, ]; @@ -182,7 +183,7 @@ const CreateDistributedUptime = () => { component="span" fontSize="inherit" > - Create your{" "} + {isCreate ? "Create your" : "Edit your"}{" "} { const BREADCRUMBS = [ { name: "distributed uptime", path: "/distributed-uptime" }, - { name: "details", path: `/distributed-uptime/${monitorId}` }, + { + name: "details", + path: `/distributed-uptime/${isCreate ? monitorId : statusPage?.monitors[0]}`, + }, { name: isCreate ? "create status page" : "edit status page", path: `` }, ]; // Local state @@ -173,7 +176,7 @@ const CreateStatus = () => { component="span" fontSize="inherit" > - Create your{" "} + {isCreate ? "Create your" : "Edit your"}{" "}